summaryrefslogtreecommitdiff
path: root/pkg/util/utils.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/util/utils.go')
-rw-r--r--pkg/util/utils.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkg/util/utils.go b/pkg/util/utils.go
index 9a93021e4..edcf63f80 100644
--- a/pkg/util/utils.go
+++ b/pkg/util/utils.go
@@ -44,3 +44,13 @@ func ParseRegistryCreds(creds string) (*types.DockerAuthConfig, error) {
Password: password,
}, nil
}
+
+// StringInSlice determines if a string is in a string slice, returns bool
+func StringInSlice(s string, sl []string) bool {
+ for _, i := range sl {
+ if i == s {
+ return true
+ }
+ }
+ return false
+}