diff options
Diffstat (limited to 'cmd/podman/system')
-rw-r--r-- | cmd/podman/system/connection/add.go | 2 | ||||
-rw-r--r-- | cmd/podman/system/df.go | 4 | ||||
-rw-r--r-- | cmd/podman/system/events.go | 6 | ||||
-rw-r--r-- | cmd/podman/system/info.go | 6 | ||||
-rw-r--r-- | cmd/podman/system/migrate.go | 2 | ||||
-rw-r--r-- | cmd/podman/system/prune.go | 2 | ||||
-rw-r--r-- | cmd/podman/system/reset.go | 2 | ||||
-rw-r--r-- | cmd/podman/system/service.go | 2 | ||||
-rw-r--r-- | cmd/podman/system/varlink.go | 2 | ||||
-rw-r--r-- | cmd/podman/system/version.go | 7 |
10 files changed, 17 insertions, 18 deletions
diff --git a/cmd/podman/system/connection/add.go b/cmd/podman/system/connection/add.go index df036af1a..0d81a64ca 100644 --- a/cmd/podman/system/connection/add.go +++ b/cmd/podman/system/connection/add.go @@ -27,7 +27,7 @@ const schemaPattern = "^[A-Za-z][A-Za-z0-9+.-]*:" var ( addCmd = &cobra.Command{ - Use: "add [flags] NAME DESTINATION", + Use: "add [options] NAME DESTINATION", Args: cobra.ExactArgs(2), Short: "Record destination for the Podman service", Long: `Add destination to podman configuration. diff --git a/cmd/podman/system/df.go b/cmd/podman/system/df.go index da7bbed02..b11167938 100644 --- a/cmd/podman/system/df.go +++ b/cmd/podman/system/df.go @@ -8,8 +8,8 @@ import ( "text/template" "time" + "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/docker/go-units" @@ -23,7 +23,7 @@ var ( Show podman disk usage ` dfSystemCommand = &cobra.Command{ - Use: "df", + Use: "df [options]", Args: validate.NoArgs, Short: "Show podman disk usage", Long: dfSystemDescription, diff --git a/cmd/podman/system/events.go b/cmd/podman/system/events.go index aaf572873..368cd41a6 100644 --- a/cmd/podman/system/events.go +++ b/cmd/podman/system/events.go @@ -6,7 +6,7 @@ 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/validate" "github.com/containers/podman/v2/libpod/events" @@ -20,7 +20,7 @@ var ( By default, streaming mode is used, printing new events as they occur. Previous events can be listed via --since and --until.` eventsCommand = &cobra.Command{ - Use: "events", + Use: "events [options]", Args: validate.NoArgs, Short: "Show podman events", Long: eventsDescription, @@ -65,7 +65,7 @@ func eventsCmd(cmd *cobra.Command, _ []string) error { ) if cmd.Flags().Changed("format") { - doJSON = parse.MatchesJSONFormat(eventFormat) + doJSON = report.IsJSON(eventFormat) if !doJSON { var err error tmpl, err = template.New("events").Parse(eventFormat) diff --git a/cmd/podman/system/info.go b/cmd/podman/system/info.go index ee720abf8..dece6b37e 100644 --- a/cmd/podman/system/info.go +++ b/cmd/podman/system/info.go @@ -5,7 +5,7 @@ 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/validate" "github.com/containers/podman/v2/pkg/domain/entities" @@ -20,7 +20,7 @@ var ( Useful for the user and when reporting issues. ` infoCommand = &cobra.Command{ - Use: "info", + Use: "info [options]", Args: validate.NoArgs, Long: infoDescription, Short: "Display podman system information", @@ -70,7 +70,7 @@ func info(cmd *cobra.Command, args []string) error { } switch { - case parse.MatchesJSONFormat(inFormat): + case report.IsJSON(inFormat): b, err := json.MarshalIndent(info, "", " ") if err != nil { return err diff --git a/cmd/podman/system/migrate.go b/cmd/podman/system/migrate.go index 018701fc9..7870df60b 100644 --- a/cmd/podman/system/migrate.go +++ b/cmd/podman/system/migrate.go @@ -21,7 +21,7 @@ var ( ` migrateCommand = &cobra.Command{ - Use: "migrate", + Use: "migrate [options]", Args: validate.NoArgs, Short: "Migrate containers", Long: migrateDescription, diff --git a/cmd/podman/system/prune.go b/cmd/podman/system/prune.go index f34df3698..a229b06b0 100644 --- a/cmd/podman/system/prune.go +++ b/cmd/podman/system/prune.go @@ -25,7 +25,7 @@ var ( `) pruneCommand = &cobra.Command{ - Use: "prune [flags]", + Use: "prune [options]", Short: "Remove unused data", Args: validate.NoArgs, Long: pruneDescription, diff --git a/cmd/podman/system/reset.go b/cmd/podman/system/reset.go index a7a42ea58..0b04c6ee0 100644 --- a/cmd/podman/system/reset.go +++ b/cmd/podman/system/reset.go @@ -22,7 +22,7 @@ var ( All containers will be stopped and removed, and all images, volumes and container content will be removed. ` systemResetCommand = &cobra.Command{ - Use: "reset", + Use: "reset [options]", Args: validate.NoArgs, Short: "Reset podman storage", Long: systemResetDescription, diff --git a/cmd/podman/system/service.go b/cmd/podman/system/service.go index 7c692b07e..2a2b1984f 100644 --- a/cmd/podman/system/service.go +++ b/cmd/podman/system/service.go @@ -26,7 +26,7 @@ Enable a listening service for API access to Podman commands. ` srvCmd = &cobra.Command{ - Use: "service [flags] [URI]", + Use: "service [options] [URI]", Args: cobra.MaximumNArgs(1), Short: "Run API service", Long: srvDescription, diff --git a/cmd/podman/system/varlink.go b/cmd/podman/system/varlink.go index 57e7e4ba6..89669d51a 100644 --- a/cmd/podman/system/varlink.go +++ b/cmd/podman/system/varlink.go @@ -16,7 +16,7 @@ var ( Tools speaking varlink protocol can remotely manage pods, containers and images. ` varlinkCmd = &cobra.Command{ - Use: "varlink [flags] [URI]", + Use: "varlink [options] [URI]", Args: cobra.MinimumNArgs(1), Short: "Run varlink interface", Long: varlinkDescription, diff --git a/cmd/podman/system/version.go b/cmd/podman/system/version.go index 4f47c5fba..b790a7511 100644 --- a/cmd/podman/system/version.go +++ b/cmd/podman/system/version.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/libpod/define" "github.com/containers/podman/v2/pkg/domain/entities" @@ -19,7 +18,7 @@ import ( var ( versionCommand = &cobra.Command{ - Use: "version", + Use: "version [options]", Args: validate.NoArgs, Short: "Display the Podman Version Information", RunE: version, @@ -42,7 +41,7 @@ func version(cmd *cobra.Command, args []string) error { return err } - if parse.MatchesJSONFormat(versionFormat) { + if report.IsJSON(versionFormat) { s, err := json.MarshalToString(versions) if err != nil { return err |