From deba1ea445bbb1008d12f650782419a1a2b9aa04 Mon Sep 17 00:00:00 2001 From: Leonardo Quatrocchi Date: Thu, 4 Apr 2024 21:15:48 -0300 Subject: [PATCH] Fix suggestions --- endpoint/endpoint.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/endpoint/endpoint.go b/endpoint/endpoint.go index 6ab558c083..da262d6d6b 100644 --- a/endpoint/endpoint.go +++ b/endpoint/endpoint.go @@ -345,16 +345,17 @@ type DNSEndpointList struct { } // RemoveDuplicates returns a slice holding the unique endpoints. -func RemoveDuplicates(filtered []*Endpoint) []*Endpoint { +func RemoveDuplicates(endpoints []*Endpoint) []*Endpoint { visited := make(map[EndpointKey]struct{}) result := []*Endpoint{} - for _, ep := range filtered { + for _, ep := range endpoints { key := ep.Key() if _, found := visited[key]; !found { result = append(result, ep) - visited[key] = struct{}{} + //visited[key] = struct{}{} + // Currently Debugging 0.14.0 to see the exact root cause } else { log.Debugf(`Skipping duplicated endpoint: %v`, ep) }