diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-05-24 13:48:50 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-24 13:48:50 -0400 |
commit | eea7491d6b02893766b806775bf00c992a824fd2 (patch) | |
tree | 131f4e27cebc82ee86de3bc7165dec0ec6857946 /pkg/util/utils.go | |
parent | c6152f40a0d083a894b03ea18f1fabd1b4b68852 (diff) | |
parent | 5d37d80ff9783b2c811a06d80cd06fd6e338faf0 (diff) | |
download | podman-eea7491d6b02893766b806775bf00c992a824fd2.tar.gz podman-eea7491d6b02893766b806775bf00c992a824fd2.tar.bz2 podman-eea7491d6b02893766b806775bf00c992a824fd2.zip |
Merge pull request #14327 from rhatdan/common
Use containers/common/pkg/util.StringToSlice
Diffstat (limited to 'pkg/util/utils.go')
-rw-r--r-- | pkg/util/utils.go | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/pkg/util/utils.go b/pkg/util/utils.go index a0bf8b50d..1b7663330 100644 --- a/pkg/util/utils.go +++ b/pkg/util/utils.go @@ -17,6 +17,7 @@ import ( "github.com/BurntSushi/toml" "github.com/containers/common/pkg/config" + "github.com/containers/common/pkg/util" "github.com/containers/image/v5/types" "github.com/containers/podman/v4/pkg/errorhandling" "github.com/containers/podman/v4/pkg/namespaces" @@ -78,14 +79,9 @@ func ParseRegistryCreds(creds string) (*types.DockerAuthConfig, error) { }, nil } -// StringInSlice determines if a string is in a string slice, returns bool +// StringInSlice is depracated, use containers/common/pkg/util/StringInSlice func StringInSlice(s string, sl []string) bool { - for _, i := range sl { - if i == s { - return true - } - } - return false + return util.StringInSlice(s, sl) } // StringMatchRegexSlice determines if a given string matches one of the given regexes, returns bool |