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 /cmd/podman | |
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 'cmd/podman')
-rw-r--r-- | cmd/podman/containers/create.go | 3 | ||||
-rw-r--r-- | cmd/podman/images/save.go | 2 | ||||
-rw-r--r-- | cmd/podman/images/trust_set.go | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/cmd/podman/containers/create.go b/cmd/podman/containers/create.go index 29e138e30..c62ddd6eb 100644 --- a/cmd/podman/containers/create.go +++ b/cmd/podman/containers/create.go @@ -9,6 +9,7 @@ import ( "github.com/containers/common/pkg/completion" "github.com/containers/common/pkg/config" + cutil "github.com/containers/common/pkg/util" "github.com/containers/image/v5/transports/alltransports" "github.com/containers/image/v5/types" "github.com/containers/podman/v4/cmd/podman/common" @@ -116,7 +117,7 @@ func create(cmd *cobra.Command, args []string) error { if !cmd.Flags().Changed("pod") { return errors.New("must specify pod value with init-ctr") } - if !util.StringInSlice(initctr, []string{define.AlwaysInitContainer, define.OneShotInitContainer}) { + if !cutil.StringInSlice(initctr, []string{define.AlwaysInitContainer, define.OneShotInitContainer}) { return errors.Errorf("init-ctr value must be '%s' or '%s'", define.AlwaysInitContainer, define.OneShotInitContainer) } cliVals.InitContainerType = initctr diff --git a/cmd/podman/images/save.go b/cmd/podman/images/save.go index 3394c2e99..d85d688ee 100644 --- a/cmd/podman/images/save.go +++ b/cmd/podman/images/save.go @@ -6,12 +6,12 @@ import ( "strings" "github.com/containers/common/pkg/completion" + "github.com/containers/common/pkg/util" "github.com/containers/podman/v4/cmd/podman/common" "github.com/containers/podman/v4/cmd/podman/parse" "github.com/containers/podman/v4/cmd/podman/registry" "github.com/containers/podman/v4/libpod/define" "github.com/containers/podman/v4/pkg/domain/entities" - "github.com/containers/podman/v4/pkg/util" "github.com/pkg/errors" "github.com/spf13/cobra" "golang.org/x/term" diff --git a/cmd/podman/images/trust_set.go b/cmd/podman/images/trust_set.go index fff035d12..f4ff0cffc 100644 --- a/cmd/podman/images/trust_set.go +++ b/cmd/podman/images/trust_set.go @@ -5,10 +5,10 @@ import ( "regexp" "github.com/containers/common/pkg/completion" + "github.com/containers/common/pkg/util" "github.com/containers/podman/v4/cmd/podman/common" "github.com/containers/podman/v4/cmd/podman/registry" "github.com/containers/podman/v4/pkg/domain/entities" - "github.com/containers/podman/v4/pkg/util" "github.com/pkg/errors" "github.com/spf13/cobra" ) |