diff options
Diffstat (limited to 'cmd/podman/system.go')
-rw-r--r-- | cmd/podman/system.go | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/cmd/podman/system.go b/cmd/podman/system.go index 9596252ad..f6b28fee1 100644 --- a/cmd/podman/system.go +++ b/cmd/podman/system.go @@ -1,29 +1,23 @@ package main import ( - "sort" - - "github.com/urfave/cli" + "github.com/containers/libpod/cmd/podman/cliconfig" + "github.com/spf13/cobra" ) var ( - systemSubCommands = []cli.Command{ - pruneSystemCommand, - } systemDescription = "Manage podman" - systemCommand = cli.Command{ - Name: "system", - Usage: "Manage podman", - Description: systemDescription, - ArgsUsage: "", - Subcommands: getSystemSubCommandsSorted(), - UseShortOptionHandling: true, - OnUsageError: usageErrorHandler, + + systemCommand = cliconfig.PodmanCommand{ + Command: &cobra.Command{ + Use: "system", + Short: "Manage podman", + Long: systemDescription, + }, } ) -func getSystemSubCommandsSorted() []cli.Command { - systemSubCommands = append(systemSubCommands, getSystemSubCommands()...) - sort.Sort(commandSortedAlpha{systemSubCommands}) - return systemSubCommands +func init() { + systemCommand.AddCommand(getSystemSubCommands()...) + rootCmd.AddCommand(systemCommand.Command) } |