Update endpoint/endpoint.go

Co-authored-by: Eric Bailey <yurrriq@users.noreply.github.com>
This commit is contained in:
leonardocaylent 2024-04-04 16:35:21 -03:00 committed by GitHub
parent 6066b700b8
commit 3ca4d0250f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -344,7 +344,7 @@ type DNSEndpointList struct {
Items []DNSEndpoint `json:"items"`
}
// Apply filter based on EndpointKey (using DNSName, RecordType & SetIdentifier)
// RemoveDuplicates returns a slice holding the unique endpoints.
func RemoveDuplicates(filtered []*Endpoint) []*Endpoint {
visited := make(map[EndpointKey]struct{})
result := []*Endpoint{}