Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardocaylent committed Mar 16, 2024
1 parent a3826d5 commit 30c9e77
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions endpoint/endpoint.go
Expand Up @@ -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
Expand Down

0 comments on commit 30c9e77

Please sign in to comment.