diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-05-19 18:45:03 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-19 18:45:03 -0400 |
commit | 1916fe22a932183e0847e9f7b087f6ece4d7c48c (patch) | |
tree | 49a030b80ad533a4befae84274e9a72dd99ad639 /cmd/podman/images | |
parent | 913caaa9b1de2b63692c9bae15120208194c9eb3 (diff) | |
parent | 9c9fc96d2756ba6ff1ef3a2e8301992d4b5ab189 (diff) | |
download | podman-1916fe22a932183e0847e9f7b087f6ece4d7c48c.tar.gz podman-1916fe22a932183e0847e9f7b087f6ece4d7c48c.tar.bz2 podman-1916fe22a932183e0847e9f7b087f6ece4d7c48c.zip |
Merge pull request #14272 from Luap99/completion2
shell completion: use more constants in the code
Diffstat (limited to 'cmd/podman/images')
-rw-r--r-- | cmd/podman/images/inspect.go | 2 | ||||
-rw-r--r-- | cmd/podman/images/save.go | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/cmd/podman/images/inspect.go b/cmd/podman/images/inspect.go index 22c404b3f..310f8cda8 100644 --- a/cmd/podman/images/inspect.go +++ b/cmd/podman/images/inspect.go @@ -38,6 +38,6 @@ func init() { } func inspectExec(cmd *cobra.Command, args []string) error { - inspectOpts.Type = inspect.ImageType + inspectOpts.Type = common.ImageType return inspect.Inspect(args, *inspectOpts) } diff --git a/cmd/podman/images/save.go b/cmd/podman/images/save.go index fb642bafd..3394c2e99 100644 --- a/cmd/podman/images/save.go +++ b/cmd/podman/images/save.go @@ -18,7 +18,6 @@ import ( ) var ( - validFormats = []string{define.OCIManifestDir, define.OCIArchive, define.V2s2ManifestDir, define.V2s2Archive} containerConfig = registry.PodmanConfig() ) @@ -38,8 +37,8 @@ var ( if err != nil { return err } - if !util.StringInSlice(format, validFormats) { - return errors.Errorf("format value must be one of %s", strings.Join(validFormats, " ")) + if !util.StringInSlice(format, common.ValidSaveFormats) { + return errors.Errorf("format value must be one of %s", strings.Join(common.ValidSaveFormats, " ")) } return nil }, |