From b119427405b761e35a84ecc99a2f92d56148e67d Mon Sep 17 00:00:00 2001 From: Christophe de Dinechin Date: Thu, 10 Sep 2020 19:54:12 +0200 Subject: [PATCH] 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 --- src/runtime/virtcontainers/pkg/oci/utils.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/runtime/virtcontainers/pkg/oci/utils.go b/src/runtime/virtcontainers/pkg/oci/utils.go index adb2d8acd..6e3e27217 100644 --- a/src/runtime/virtcontainers/pkg/oci/utils.go +++ b/src/runtime/virtcontainers/pkg/oci/utils.go @@ -183,18 +183,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 } }