diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2020-05-04 10:52:29 -0400 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2020-05-04 14:16:34 -0400 |
commit | 6ed3b8841f00d2aa1f86678c079a119e027b0d66 (patch) | |
tree | 4befccb87c0b5e4208af4e3ed92b144d7ba45c59 /cmd/podman/images/load.go | |
parent | 01aad516e012fe46179e053addd7a8a84788228b (diff) | |
download | podman-6ed3b8841f00d2aa1f86678c079a119e027b0d66.tar.gz podman-6ed3b8841f00d2aa1f86678c079a119e027b0d66.tar.bz2 podman-6ed3b8841f00d2aa1f86678c079a119e027b0d66.zip |
Fix errors found when comparing podman v1 --help versus V2
Mainly add missing commands to podman image, podman containers, podman system
Also fix some informations messages and descriptions.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
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") |