func DeleteRuleFromSlice(src []*cwe.Rule, deleteIndex int) []*cwe.Rule {
	dest := []*cwe.Rule{}
	for i, rule := range src {
		if i != deleteIndex {
			dest = append(dest, rule)
		}
	}
	return dest
}
DeleteRuleFromSlice return ClowdWatchEvent Rules that deleted specified index rule.
package main
import (
	cwe "github.com/aws/aws-sdk-go/service/cloudwatchevents"
)
func CompareString(a, b *string) bool {
	if a == nil || *a == "" {
		if b == nil || *b == "" {
			return true
		}
		return false
	} else if b == nil || *b == "" {
		if a == nil || *a == "" {
			return true
		}
		return false
	}
	return *a == *b
}
func CompareInt64(a, b *int64) bool {
	if a == nil {
		if b == nil {
			return true
		}
		return false
	} else if b == nil {
		return false
	}
	return *a == *b
}
func CompareKinesisParameters(own *KinesisParameters, theirs *cwe.KinesisParameters) bool {
	if theirs == nil {
		if own.PartitionKeyPath == "" {
			return true
		}
	} else {
		if CompareString(&own.PartitionKeyPath, theirs.PartitionKeyPath) {
			return true
		}
	}
	return false
}
func CompareEcsParameters(own *EcsParameters, theirs *cwe.EcsParameters) bool {
	if theirs == nil {
		if own.TaskDefinitionArn == "" && own.TaskCount == 0 {
			return true
		}
	} else {
		if CompareString(&own.TaskDefinitionArn, theirs.TaskDefinitionArn) &&
			CompareInt64(&own.TaskCount, theirs.TaskCount) {
			return true
		}
	}
	return false
}