From 30c9e77765df4300be4145858cc81707d1db1db3 Mon Sep 17 00:00:00 2001 From: leonardocaylent <146885187+leonardocaylent@users.noreply.github.com> Date: Sat, 16 Mar 2024 00:00:00 -0300 Subject: [PATCH] Fix lint --- endpoint/endpoint.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/endpoint/endpoint.go b/endpoint/endpoint.go index e9d4132615..3bb50107ec 100644 --- a/endpoint/endpoint.go +++ b/endpoint/endpoint.go @@ -295,8 +295,9 @@ func FilterEndpointsByOwnerID(ownerID string, eps []*Endpoint) []*Endpoint { filtered := []*Endpoint{} visited := make(map[EndpointKey]bool) // Initialize the visited map for _, ep := range eps { - //key := EndpointKey{DNSName: ep.DNSName, RecordType: ep.RecordType, SetIdentifier: ep.SetIdentifier} --< this line passes the unit tests but I think it's wrong - key := ep.Key() // This function should be the primary key for endpoints but it's only considering DNSName, RecordType & SetIdentifier. + // key := EndpointKey{DNSName: ep.DNSName, RecordType: ep.RecordType, SetIdentifier: ep.SetIdentifier} --< this line passes the unit tests but I think it's wrong + key := ep.Key() + // This function should be the primary key for endpoints but it's only considering DNSName, RecordType & SetIdentifier. if visited[key] { //Do not contain duplicated endpoints log.Debugf(`Already loaded endpoint %v `, ep) continue