func (r IngressRule) EqualTo(other IngressRule) bool {
	// Check dst port ranges first.
	if r.PortRange != other.PortRange {
		return false
	} else if len(r.SourceCIDRs) != len(other.SourceCIDRs) {
		return false
	}

	// Compare CIDRs
	thisSrc := r.SourceCIDRs.SortedValues()
	otherSrc := other.SourceCIDRs.SortedValues()
	for i, thisCIDR := range thisSrc {
		if thisCIDR != otherSrc[i] {
			return false
		}
	}
	return true
}
// EqualTo returns true if this rule is equal to the provided rule.
EqualTo returns true if this rule is equal to the provided rule.
// EqualTo returns true if this rule is equal to the provided rule .
func (r IngressRule) EqualTo(other IngressRule) bool {
	if r.PortRange != other.PortRange {
		return false
	} else if len(r.SourceCIDRs) != len(other.SourceCIDRs) {
		return false
	}
	thisSrc := r.SourceCIDRs.SortedValues()
	otherSrc := other.SourceCIDRs.SortedValues()
	for i, thisCIDR := range thisSrc {
		if thisCIDR != otherSrc[i] {
			return false
		}
	}
	return true
}
func ( r IngressRule ) EqualTo ( other IngressRule ) bool { if r . PortRange != other . PortRange { return false } else if len ( r . SourceCIDRs ) != len ( other . SourceCIDRs ) { return false } thisSrc := r . SourceCIDRs . SortedValues ( ) otherSrc := other . SourceCIDRs . SortedValues ( ) for i , thisCIDR := range thisSrc { if thisCIDR != otherSrc [ i ] { return false } } return true }
EqualTo returns true if this rule is equal to the provided rule.
EqualTo returns true if this rule is equal to the provided rule .
// Check dst port ranges first. // Compare CIDRs