diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-05-05 15:57:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-05 15:57:08 +0200 |
commit | 4a1331d0afd9a21ff9465916d4006ff7297ae07c (patch) | |
tree | 97b56fc4361ed81c84dff9e07d46abf302670f1b /cmd/podman/images/load.go | |
parent | c313eec620becf710af925c02b7e5dfd80bd9ba6 (diff) | |
parent | 6ed3b8841f00d2aa1f86678c079a119e027b0d66 (diff) | |
download | podman-4a1331d0afd9a21ff9465916d4006ff7297ae07c.tar.gz podman-4a1331d0afd9a21ff9465916d4006ff7297ae07c.tar.bz2 podman-4a1331d0afd9a21ff9465916d4006ff7297ae07c.zip |
Merge pull request #6077 from rhatdan/v2
Fix errors found when comparing podman v1 --help versus V2
Diffstat (limited to 'cmd/podman/images/load.go')
-rw-r--r-- | cmd/podman/images/load.go | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/cmd/podman/images/load.go b/cmd/podman/images/load.go index f49f95002..d34c794c6 100644 --- a/cmd/podman/images/load.go +++ b/cmd/podman/images/load.go @@ -15,6 +15,7 @@ import ( "github.com/containers/libpod/pkg/util" "github.com/pkg/errors" "github.com/spf13/cobra" + "github.com/spf13/pflag" "golang.org/x/crypto/ssh/terminal" ) @@ -27,6 +28,14 @@ var ( RunE: load, Args: cobra.MaximumNArgs(1), } + + imageLoadCommand = &cobra.Command{ + Args: cobra.MinimumNArgs(1), + Use: loadCommand.Use, + Short: loadCommand.Short, + Long: loadCommand.Long, + RunE: loadCommand.RunE, + } ) var ( @@ -38,8 +47,16 @@ func init() { Mode: []entities.EngineMode{entities.ABIMode, entities.TunnelMode}, Command: loadCommand, }) + loadFlags(loadCommand.Flags()) + registry.Commands = append(registry.Commands, registry.CliCommand{ + Mode: []entities.EngineMode{entities.ABIMode, entities.TunnelMode}, + Command: imageLoadCommand, + Parent: imageCmd, + }) + loadFlags(imageLoadCommand.Flags()) +} - flags := loadCommand.Flags() +func loadFlags(flags *pflag.FlagSet) { flags.StringVarP(&loadOpts.Input, "input", "i", "", "Read from specified archive file (default: stdin)") flags.BoolVarP(&loadOpts.Quiet, "quiet", "q", false, "Suppress the output") flags.StringVar(&loadOpts.SignaturePolicy, "signature-policy", "", "Pathname of signature policy file") |