From 00ec28826ca7a5ce0a943a22ccf81867f2579766 Mon Sep 17 00:00:00 2001 From: Luiz Aoqui Date: Wed, 6 Jul 2022 10:01:01 -0400 Subject: [PATCH] fix linter and simplify anyNamespaceAllows --- acl/acl.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/acl/acl.go b/acl/acl.go index 13377147e20..bc343bc093f 100644 --- a/acl/acl.go +++ b/acl/acl.go @@ -363,11 +363,7 @@ func (a *ACL) anyNamespaceAllows(cb func(capabilitySet) bool) bool { checkFn := func(_ []byte, iv interface{}) bool { v := iv.(capabilitySet) - allow = cb(v) - if allow { - return true - } - return false + return cb(v) } a.namespaces.Root().Walk(checkFn)