func (r IngressRule) LessThan(other IngressRule) bool {
	// Check dst port ranges first.
	if r.PortRange != other.PortRange {
		return r.PortRange.LessThan(other.PortRange)
	}

	// Compare the source CIDRs. NOTE(achilleasa) this retains the
	// original behavior of the code moved out of the network package.
	thisSrc := strings.Join(r.SourceCIDRs.SortedValues(), ",")
	otherSrc := strings.Join(other.SourceCIDRs.SortedValues(), ",")
	return thisSrc < otherSrc
}
// LessThan compares two IngressRule instances for equality.
LessThan compares two IngressRule instances for equality.
// LessThan compares two IngressRule instances for equality .
func (r IngressRule) LessThan(other IngressRule) bool {
	if r.PortRange != other.PortRange {
		return r.PortRange.LessThan(other.PortRange)
	}
	thisSrc := strings.Join(r.SourceCIDRs.SortedValues(), ",")
	otherSrc := strings.Join(other.SourceCIDRs.SortedValues(), ",")
	return thisSrc < otherSrc
}
func ( r IngressRule ) LessThan ( other IngressRule ) bool { if r . PortRange != other . PortRange { return r . PortRange . LessThan ( other . PortRange ) } thisSrc := strings . Join ( r . SourceCIDRs . SortedValues ( ) , " " ) otherSrc := strings . Join ( other . SourceCIDRs . SortedValues ( ) , " " ) return thisSrc < otherSrc }
LessThan compares two IngressRule instances for equality.
LessThan compares two IngressRule instances for equality .
// Check dst port ranges first. // Compare the source CIDRs. NOTE(achilleasa) this retains the // original behavior of the code moved out of the network package.