annotations: Give better names to local variabes in search functions

Use more meaningful variable names for clarity.

Fixes: #901

Suggested-by: James O.D. Hunt james.o.hunt@intel.com>
Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
This commit is contained in:
Christophe de Dinechin 2020-09-10 19:54:12 +02:00
parent b5db114aad
commit b119427405

View File

@ -183,18 +183,18 @@ func containerMounts(spec specs.Spec) []vc.Mount {
return mnts return mnts
} }
func contains(s []string, e string) bool { func contains(strings []string, toFind string) bool {
for _, a := range s { for _, candidate := range strings {
if a == e { if candidate == toFind {
return true return true
} }
} }
return false return false
} }
func regexpContains(s []string, e string) bool { func regexpContains(regexps []string, toMatch string) bool {
for _, a := range s { for _, candidate := range regexps {
if matched, _ := regexp.MatchString(a, e); matched { if matched, _ := regexp.MatchString(candidate, toMatch); matched {
return true return true
} }
} }