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 committed by Peng Tao
parent 997f7c4433
commit a92a63031d

View File

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