summaryrefslogtreecommitdiff
path: root/cmd/podman/volumes
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/volumes')
-rw-r--r--cmd/podman/volumes/create.go2
-rw-r--r--cmd/podman/volumes/inspect.go7
-rw-r--r--cmd/podman/volumes/list.go7
-rw-r--r--cmd/podman/volumes/prune.go2
-rw-r--r--cmd/podman/volumes/rm.go2
5 files changed, 9 insertions, 11 deletions
diff --git a/cmd/podman/volumes/create.go b/cmd/podman/volumes/create.go
index 934a552dc..a54530183 100644
--- a/cmd/podman/volumes/create.go
+++ b/cmd/podman/volumes/create.go
@@ -15,7 +15,7 @@ var (
createDescription = `If using the default driver, "local", the volume will be created on the host in the volumes directory under container storage.`
createCommand = &cobra.Command{
- Use: "create [flags] [NAME]",
+ Use: "create [options] [NAME]",
Short: "Create a new volume",
Long: createDescription,
RunE: create,
diff --git a/cmd/podman/volumes/inspect.go b/cmd/podman/volumes/inspect.go
index 8d1350228..732a67333 100644
--- a/cmd/podman/volumes/inspect.go
+++ b/cmd/podman/volumes/inspect.go
@@ -5,9 +5,8 @@ import (
"os"
"text/template"
- "github.com/containers/podman/v2/cmd/podman/parse"
+ "github.com/containers/common/pkg/report"
"github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/report"
"github.com/containers/podman/v2/pkg/domain/entities"
"github.com/pkg/errors"
"github.com/spf13/cobra"
@@ -19,7 +18,7 @@ var (
Use a Go template to change the format from JSON.`
inspectCommand = &cobra.Command{
- Use: "inspect [flags] VOLUME [VOLUME...]",
+ Use: "inspect [options] VOLUME [VOLUME...]",
Short: "Display detailed information on one or more volumes",
Long: volumeInspectDescription,
RunE: inspect,
@@ -55,7 +54,7 @@ func inspect(cmd *cobra.Command, args []string) error {
}
switch {
- case parse.MatchesJSONFormat(inspectFormat), inspectFormat == "":
+ case report.IsJSON(inspectFormat), inspectFormat == "":
jsonOut, err := json.MarshalIndent(responses, "", " ")
if err != nil {
return errors.Wrapf(err, "error marshalling inspect JSON")
diff --git a/cmd/podman/volumes/list.go b/cmd/podman/volumes/list.go
index 18765a499..b3b2b8ea1 100644
--- a/cmd/podman/volumes/list.go
+++ b/cmd/podman/volumes/list.go
@@ -8,9 +8,8 @@ import (
"text/tabwriter"
"text/template"
- "github.com/containers/podman/v2/cmd/podman/parse"
+ "github.com/containers/common/pkg/report"
"github.com/containers/podman/v2/cmd/podman/registry"
- "github.com/containers/podman/v2/cmd/podman/report"
"github.com/containers/podman/v2/cmd/podman/validate"
"github.com/containers/podman/v2/pkg/domain/entities"
"github.com/pkg/errors"
@@ -24,7 +23,7 @@ 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.`
lsCommand = &cobra.Command{
- Use: "ls",
+ Use: "ls [options]",
Aliases: []string{"list"},
Args: validate.NoArgs,
Short: "List volumes",
@@ -75,7 +74,7 @@ func list(cmd *cobra.Command, args []string) error {
}
switch {
- case parse.MatchesJSONFormat(cliOpts.Format):
+ case report.IsJSON(cliOpts.Format):
return outputJSON(responses)
case len(responses) < 1:
return nil
diff --git a/cmd/podman/volumes/prune.go b/cmd/podman/volumes/prune.go
index 78c258bec..79e6f1a54 100644
--- a/cmd/podman/volumes/prune.go
+++ b/cmd/podman/volumes/prune.go
@@ -21,7 +21,7 @@ var (
The command prompts for confirmation which can be overridden with the --force flag.
Note all data will be destroyed.`
pruneCommand = &cobra.Command{
- Use: "prune",
+ Use: "prune [options]",
Args: validate.NoArgs,
Short: "Remove all unused volumes",
Long: volumePruneDescription,
diff --git a/cmd/podman/volumes/rm.go b/cmd/podman/volumes/rm.go
index 4c960d4d5..4026764ac 100644
--- a/cmd/podman/volumes/rm.go
+++ b/cmd/podman/volumes/rm.go
@@ -18,7 +18,7 @@ var (
By default only volumes that are not being used by any containers will be removed. To remove the volumes anyways, use the --force flag.`
rmCommand = &cobra.Command{
- Use: "rm [flags] VOLUME [VOLUME...]",
+ Use: "rm [options] VOLUME [VOLUME...]",
Aliases: []string{"remove"},
Short: "Remove one or more volumes",
Long: volumeRmDescription,