diff options
Diffstat (limited to 'cmd/podman/volume_ls.go')
-rw-r--r-- | cmd/podman/volume_ls.go | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/cmd/podman/volume_ls.go b/cmd/podman/volume_ls.go index 5adfc1e91..2f35462a3 100644 --- a/cmd/podman/volume_ls.go +++ b/cmd/podman/volume_ls.go @@ -4,8 +4,8 @@ import ( "reflect" "strings" + "github.com/containers/buildah/pkg/formats" "github.com/containers/libpod/cmd/podman/cliconfig" - "github.com/containers/libpod/cmd/podman/formats" "github.com/containers/libpod/pkg/adapter" "github.com/pkg/errors" "github.com/spf13/cobra" @@ -44,11 +44,11 @@ var ( podman volume ls List all available volumes. The output of the volumes can be filtered -and the output format can be changed to JSON or a user specified Go template. -` +and the output format can be changed to JSON or a user specified Go template.` _volumeLsCommand = &cobra.Command{ Use: "ls", Aliases: []string{"list"}, + Args: noSubArgs, Short: "List volumes", Long: volumeLsDescription, RunE: func(cmd *cobra.Command, args []string) error { @@ -61,6 +61,7 @@ and the output format can be changed to JSON or a user specified Go template. func init() { volumeLsCommand.Command = _volumeLsCommand + volumeLsCommand.SetHelpTemplate(HelpTemplate()) volumeLsCommand.SetUsageTemplate(UsageTemplate()) flags := volumeLsCommand.Flags() @@ -76,10 +77,6 @@ func volumeLsCmd(c *cliconfig.VolumeLsValues) error { } defer runtime.Shutdown(false) - if len(c.InputArgs) > 0 { - return errors.Errorf("too many arguments, ls takes no arguments") - } - opts := volumeLsOptions{ Quiet: c.Quiet, } |