Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SameEndpoint ¶
SameEndpoint returns true if two endpoints are same considers example.org. and example.org DNSName/Target as different endpoints
func SameEndpoints ¶
SameEndpoints compares two slices of endpoints regardless of order [x,y,z] == [z,x,y] [x,x,z] == [x,z,x] [x,y,y] != [x,x,y] [x,x,x] != [x,x,z]
Example ¶
eps := []*endpoint.Endpoint{ { DNSName: "example.org", Target: "load-balancer.org", }, { DNSName: "example.org", Target: "load-balancer.org", RecordType: "TXT", }, { DNSName: "abc.com", Target: "something", RecordType: "TXT", }, { DNSName: "abc.com", Target: "1.2.3.4", RecordType: "A", }, { DNSName: "bbc.com", Target: "foo.com", RecordType: "CNAME", }, } sort.Sort(byAllFields(eps)) for _, ep := range eps { fmt.Println(ep) }
Output: A: abc.com -> 1.2.3.4 TXT: abc.com -> something CNAME: bbc.com -> foo.com : example.org -> load-balancer.org TXT: example.org -> load-balancer.org
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.