Skip to content

Commit

Permalink
removing dead var
Browse files Browse the repository at this point in the history
  • Loading branch information
ncode committed Dec 5, 2023
1 parent 6757a4b commit c5f5fab
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions pkg/aclmanager/aclmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,12 @@ func (a *AclManager) SyncAcls(ctx context.Context, primary *AclManager) (added [
}

// Delete ACLs not in source and remove from the toAdd map if present in destination
var insync uint
for _, acl := range destinationAcls {
username := strings.Split(acl, " ")[1]
if _, found := toAdd[acl]; found {
// If found in source, don't need to add, so remove from map
delete(toAdd, acl)
slog.Debug("ACL already in sync", "username", username)
insync++
} else {
// If not found in source, delete from destination
slog.Debug("Deleting ACL", "username", username)
Expand Down

0 comments on commit c5f5fab

Please sign in to comment.