Sort all command flags

Signed-off-by: Qi Wang <qiwan@redhat.com>
This commit is contained in:
Qi Wang
2018-10-09 16:06:45 -04:00
parent b5f4bb15a5
commit d73600626d
54 changed files with 61 additions and 53 deletions

View File

@ -30,7 +30,7 @@ var (
Name: "attach", Name: "attach",
Usage: "Attach to a running container", Usage: "Attach to a running container",
Description: attachDescription, Description: attachDescription,
Flags: attachFlags, Flags: sortFlags(attachFlags),
Action: attachCmd, Action: attachCmd,
ArgsUsage: "", ArgsUsage: "",
OnUsageError: usageErrorHandler, OnUsageError: usageErrorHandler,

View File

@ -29,7 +29,7 @@ var (
Name: "build", Name: "build",
Usage: "Build an image using instructions from Dockerfiles", Usage: "Build an image using instructions from Dockerfiles",
Description: buildDescription, Description: buildDescription,
Flags: append(append(buildahcli.BudFlags, layerFlags...), buildahcli.FromAndBudFlags...), Flags: sortFlags(append(append(buildahcli.BudFlags, layerFlags...), buildahcli.FromAndBudFlags...)),
Action: buildCmd, Action: buildCmd,
ArgsUsage: "CONTEXT-DIRECTORY | URL", ArgsUsage: "CONTEXT-DIRECTORY | URL",
SkipArgReorder: true, SkipArgReorder: true,

View File

@ -27,7 +27,7 @@ var (
Name: "checkpoint", Name: "checkpoint",
Usage: "Checkpoints one or more containers", Usage: "Checkpoints one or more containers",
Description: checkpointDescription, Description: checkpointDescription,
Flags: checkpointFlags, Flags: sortFlags(checkpointFlags),
Action: checkpointCmd, Action: checkpointCmd,
ArgsUsage: "CONTAINER-NAME [CONTAINER-NAME ...]", ArgsUsage: "CONTAINER-NAME [CONTAINER-NAME ...]",
} }

View File

@ -27,7 +27,7 @@ var (
Name: "cleanup", Name: "cleanup",
Usage: "Cleanup network and mountpoints of one or more containers", Usage: "Cleanup network and mountpoints of one or more containers",
Description: cleanupDescription, Description: cleanupDescription,
Flags: cleanupFlags, Flags: sortFlags(cleanupFlags),
Action: cleanupCmd, Action: cleanupCmd,
ArgsUsage: "CONTAINER-NAME [CONTAINER-NAME ...]", ArgsUsage: "CONTAINER-NAME [CONTAINER-NAME ...]",
OnUsageError: usageErrorHandler, OnUsageError: usageErrorHandler,

View File

@ -52,7 +52,7 @@ var (
Name: "commit", Name: "commit",
Usage: "Create new image based on the changed container", Usage: "Create new image based on the changed container",
Description: commitDescription, Description: commitDescription,
Flags: commitFlags, Flags: sortFlags(commitFlags),
Action: commitCmd, Action: commitCmd,
ArgsUsage: "CONTAINER [REPOSITORY[:TAG]]", ArgsUsage: "CONTAINER [REPOSITORY[:TAG]]",
OnUsageError: usageErrorHandler, OnUsageError: usageErrorHandler,

View File

@ -6,6 +6,7 @@ import (
"os" "os"
"reflect" "reflect"
"regexp" "regexp"
"sort"
"strings" "strings"
"github.com/containers/buildah" "github.com/containers/buildah"
@ -446,3 +447,10 @@ func getFormat(c *cli.Context) (string, error) {
} }
return "", errors.Errorf("unrecognized image type %q", format) return "", errors.Errorf("unrecognized image type %q", format)
} }
func sortFlags(flags []cli.Flag) []cli.Flag {
sort.Slice(flags, func(i, j int) bool {
return strings.Compare(flags[i].GetName(), flags[j].GetName()) < 0
})
return flags
}

View File

@ -48,7 +48,7 @@ var createCommand = cli.Command{
Name: "create", Name: "create",
Usage: "Create but do not start a container", Usage: "Create but do not start a container",
Description: createDescription, Description: createDescription,
Flags: createFlags, Flags: sortFlags(createFlags),
Action: createCmd, Action: createCmd,
ArgsUsage: "IMAGE [COMMAND [ARG...]]", ArgsUsage: "IMAGE [COMMAND [ARG...]]",
HideHelp: true, HideHelp: true,

View File

@ -51,7 +51,7 @@ var (
Name: "diff", Name: "diff",
Usage: "Inspect changes on container's file systems", Usage: "Inspect changes on container's file systems",
Description: diffDescription, Description: diffDescription,
Flags: diffFlags, Flags: sortFlags(diffFlags),
Action: diffCmd, Action: diffCmd,
ArgsUsage: "ID-NAME", ArgsUsage: "ID-NAME",
OnUsageError: usageErrorHandler, OnUsageError: usageErrorHandler,

View File

@ -46,7 +46,7 @@ var (
Name: "exec", Name: "exec",
Usage: "Run a process in a running container", Usage: "Run a process in a running container",
Description: execDescription, Description: execDescription,
Flags: execFlags, Flags: sortFlags(execFlags),
Action: execCmd, Action: execCmd,
ArgsUsage: "CONTAINER-NAME", ArgsUsage: "CONTAINER-NAME",
SkipArgReorder: true, SkipArgReorder: true,

View File

@ -23,7 +23,7 @@ var (
Name: "export", Name: "export",
Usage: "Export container's filesystem contents as a tar archive", Usage: "Export container's filesystem contents as a tar archive",
Description: exportDescription, Description: exportDescription,
Flags: exportFlags, Flags: sortFlags(exportFlags),
Action: exportCmd, Action: exportCmd,
ArgsUsage: "CONTAINER", ArgsUsage: "CONTAINER",
OnUsageError: usageErrorHandler, OnUsageError: usageErrorHandler,

View File

@ -59,7 +59,7 @@ var (
Name: "history", Name: "history",
Usage: "Show history of a specified image", Usage: "Show history of a specified image",
Description: historyDescription, Description: historyDescription,
Flags: historyFlags, Flags: sortFlags(historyFlags),
Action: historyCmd, Action: historyCmd,
ArgsUsage: "", ArgsUsage: "",
UseShortOptionHandling: true, UseShortOptionHandling: true,

View File

@ -124,7 +124,7 @@ var (
Name: "images", Name: "images",
Usage: "List images in local storage", Usage: "List images in local storage",
Description: imagesDescription, Description: imagesDescription,
Flags: imagesFlags, Flags: sortFlags(imagesFlags),
Action: imagesCmd, Action: imagesCmd,
ArgsUsage: "", ArgsUsage: "",
UseShortOptionHandling: true, UseShortOptionHandling: true,

View File

@ -39,7 +39,7 @@ var (
Name: "import", Name: "import",
Usage: "Import a tarball to create a filesystem image", Usage: "Import a tarball to create a filesystem image",
Description: importDescription, Description: importDescription,
Flags: importFlags, Flags: sortFlags(importFlags),
Action: importCmd, Action: importCmd,
ArgsUsage: "TARBALL [REFERENCE]", ArgsUsage: "TARBALL [REFERENCE]",
OnUsageError: usageErrorHandler, OnUsageError: usageErrorHandler,

View File

@ -16,7 +16,7 @@ var (
Name: "info", Name: "info",
Usage: infoDescription, Usage: infoDescription,
Description: `Information display here pertain to the host, current storage stats, and build of podman. Useful for the user and when reporting issues.`, Description: `Information display here pertain to the host, current storage stats, and build of podman. Useful for the user and when reporting issues.`,
Flags: infoFlags, Flags: sortFlags(infoFlags),
Action: infoCmd, Action: infoCmd,
ArgsUsage: "", ArgsUsage: "",
OnUsageError: usageErrorHandler, OnUsageError: usageErrorHandler,

View File

@ -41,7 +41,7 @@ var (
Name: "inspect", Name: "inspect",
Usage: "Displays the configuration of a container or image", Usage: "Displays the configuration of a container or image",
Description: inspectDescription, Description: inspectDescription,
Flags: inspectFlags, Flags: sortFlags(inspectFlags),
Action: inspectCmd, Action: inspectCmd,
ArgsUsage: "CONTAINER-OR-IMAGE [CONTAINER-OR-IMAGE]...", ArgsUsage: "CONTAINER-OR-IMAGE [CONTAINER-OR-IMAGE]...",
OnUsageError: usageErrorHandler, OnUsageError: usageErrorHandler,

View File

@ -31,7 +31,7 @@ var (
Name: "kill", Name: "kill",
Usage: "Kill one or more running containers with a specific signal", Usage: "Kill one or more running containers with a specific signal",
Description: killDescription, Description: killDescription,
Flags: killFlags, Flags: sortFlags(killFlags),
Action: killCmd, Action: killCmd,
ArgsUsage: "CONTAINER-NAME [CONTAINER-NAME ...]", ArgsUsage: "CONTAINER-NAME [CONTAINER-NAME ...]",
UseShortOptionHandling: true, UseShortOptionHandling: true,

View File

@ -36,7 +36,7 @@ var (
Name: "load", Name: "load",
Usage: "Load an image from docker archive", Usage: "Load an image from docker archive",
Description: loadDescription, Description: loadDescription,
Flags: loadFlags, Flags: sortFlags(loadFlags),
Action: loadCmd, Action: loadCmd,
ArgsUsage: "", ArgsUsage: "",
OnUsageError: usageErrorHandler, OnUsageError: usageErrorHandler,

View File

@ -43,7 +43,7 @@ var (
Name: "login", Name: "login",
Usage: "Login to a container registry", Usage: "Login to a container registry",
Description: loginDescription, Description: loginDescription,
Flags: loginFlags, Flags: sortFlags(loginFlags),
Action: loginCmd, Action: loginCmd,
ArgsUsage: "REGISTRY", ArgsUsage: "REGISTRY",
OnUsageError: usageErrorHandler, OnUsageError: usageErrorHandler,

View File

@ -25,7 +25,7 @@ var (
Name: "logout", Name: "logout",
Usage: "Logout of a container registry", Usage: "Logout of a container registry",
Description: logoutDescription, Description: logoutDescription,
Flags: logoutFlags, Flags: sortFlags(logoutFlags),
Action: logoutCmd, Action: logoutCmd,
ArgsUsage: "REGISTRY", ArgsUsage: "REGISTRY",
OnUsageError: usageErrorHandler, OnUsageError: usageErrorHandler,

View File

@ -43,7 +43,7 @@ var (
Name: "logs", Name: "logs",
Usage: "Fetch the logs of a container", Usage: "Fetch the logs of a container",
Description: logsDescription, Description: logsDescription,
Flags: logsFlags, Flags: sortFlags(logsFlags),
Action: logsCmd, Action: logsCmd,
ArgsUsage: "CONTAINER", ArgsUsage: "CONTAINER",
SkipArgReorder: true, SkipArgReorder: true,

View File

@ -36,7 +36,7 @@ var (
Description: mountDescription, Description: mountDescription,
Action: mountCmd, Action: mountCmd,
ArgsUsage: "[CONTAINER-NAME-OR-ID [...]]", ArgsUsage: "[CONTAINER-NAME-OR-ID [...]]",
Flags: mountFlags, Flags: sortFlags(mountFlags),
OnUsageError: usageErrorHandler, OnUsageError: usageErrorHandler,
} }
) )

View File

@ -69,7 +69,7 @@ var podCreateCommand = cli.Command{
Name: "create", Name: "create",
Usage: "Create a new empty pod", Usage: "Create a new empty pod",
Description: podCreateDescription, Description: podCreateDescription,
Flags: podCreateFlags, Flags: sortFlags(podCreateFlags),
Action: podCreateCmd, Action: podCreateCmd,
SkipArgReorder: true, SkipArgReorder: true,
UseShortOptionHandling: true, UseShortOptionHandling: true,

View File

@ -19,7 +19,7 @@ var (
Name: "inspect", Name: "inspect",
Usage: "displays a pod configuration", Usage: "displays a pod configuration",
Description: podInspectDescription, Description: podInspectDescription,
Flags: podInspectFlags, Flags: sortFlags(podInspectFlags),
Action: podInspectCmd, Action: podInspectCmd,
UseShortOptionHandling: true, UseShortOptionHandling: true,
ArgsUsage: "[POD_NAME_OR_ID]", ArgsUsage: "[POD_NAME_OR_ID]",

View File

@ -29,7 +29,7 @@ var (
Name: "kill", Name: "kill",
Usage: "Send the specified signal or SIGKILL to containers in pod", Usage: "Send the specified signal or SIGKILL to containers in pod",
Description: podKillDescription, Description: podKillDescription,
Flags: podKillFlags, Flags: sortFlags(podKillFlags),
Action: podKillCmd, Action: podKillCmd,
ArgsUsage: "[POD_NAME_OR_ID]", ArgsUsage: "[POD_NAME_OR_ID]",
UseShortOptionHandling: true, UseShortOptionHandling: true,

View File

@ -25,7 +25,7 @@ var (
Name: "pause", Name: "pause",
Usage: "Pause one or more pods", Usage: "Pause one or more pods",
Description: podPauseDescription, Description: podPauseDescription,
Flags: podPauseFlags, Flags: sortFlags(podPauseFlags),
Action: podPauseCmd, Action: podPauseCmd,
ArgsUsage: "POD-NAME|POD-ID [POD-NAME|POD-ID ...]", ArgsUsage: "POD-NAME|POD-ID [POD-NAME|POD-ID ...]",
UseShortOptionHandling: true, UseShortOptionHandling: true,

View File

@ -161,7 +161,7 @@ var (
Aliases: []string{"ls", "list"}, Aliases: []string{"ls", "list"},
Usage: "List pods", Usage: "List pods",
Description: podPsDescription, Description: podPsDescription,
Flags: podPsFlags, Flags: sortFlags(podPsFlags),
Action: podPsCmd, Action: podPsCmd,
UseShortOptionHandling: true, UseShortOptionHandling: true,
OnUsageError: usageErrorHandler, OnUsageError: usageErrorHandler,

View File

@ -23,7 +23,7 @@ var (
Name: "restart", Name: "restart",
Usage: "Restart one or more pods", Usage: "Restart one or more pods",
Description: podRestartDescription, Description: podRestartDescription,
Flags: podRestartFlags, Flags: sortFlags(podRestartFlags),
Action: podRestartCmd, Action: podRestartCmd,
ArgsUsage: "POD-NAME|POD-ID [POD-NAME|POD-ID ...]", ArgsUsage: "POD-NAME|POD-ID [POD-NAME|POD-ID ...]",
UseShortOptionHandling: true, UseShortOptionHandling: true,

View File

@ -30,7 +30,7 @@ If --force is specified, all containers will be stopped, then removed.
Name: "rm", Name: "rm",
Usage: "Remove one or more pods", Usage: "Remove one or more pods",
Description: podRmDescription, Description: podRmDescription,
Flags: podRmFlags, Flags: sortFlags(podRmFlags),
Action: podRmCmd, Action: podRmCmd,
ArgsUsage: "[POD ...]", ArgsUsage: "[POD ...]",
UseShortOptionHandling: true, UseShortOptionHandling: true,

View File

@ -27,7 +27,7 @@ var (
Name: "start", Name: "start",
Usage: "Start one or more pods", Usage: "Start one or more pods",
Description: podStartDescription, Description: podStartDescription,
Flags: podStartFlags, Flags: sortFlags(podStartFlags),
Action: podStartCmd, Action: podStartCmd,
ArgsUsage: "POD-NAME [POD-NAME ...]", ArgsUsage: "POD-NAME [POD-NAME ...]",
UseShortOptionHandling: true, UseShortOptionHandling: true,

View File

@ -39,7 +39,7 @@ var (
Name: "stats", Name: "stats",
Usage: "Display percentage of CPU, memory, network I/O, block I/O and PIDs for containers in one or more pods", Usage: "Display percentage of CPU, memory, network I/O, block I/O and PIDs for containers in one or more pods",
Description: podStatsDescription, Description: podStatsDescription,
Flags: podStatsFlags, Flags: sortFlags(podStatsFlags),
Action: podStatsCmd, Action: podStatsCmd,
ArgsUsage: "[POD_NAME_OR_ID]", ArgsUsage: "[POD_NAME_OR_ID]",
UseShortOptionHandling: true, UseShortOptionHandling: true,

View File

@ -27,7 +27,7 @@ var (
Name: "stop", Name: "stop",
Usage: "Stop one or more pods", Usage: "Stop one or more pods",
Description: podStopDescription, Description: podStopDescription,
Flags: podStopFlags, Flags: sortFlags(podStopFlags),
Action: podStopCmd, Action: podStopCmd,
ArgsUsage: "POD-NAME [POD-NAME ...]", ArgsUsage: "POD-NAME [POD-NAME ...]",
OnUsageError: usageErrorHandler, OnUsageError: usageErrorHandler,

View File

@ -32,7 +32,7 @@ the latest pod.
Name: "top", Name: "top",
Usage: "Display the running processes of containers in a pod", Usage: "Display the running processes of containers in a pod",
Description: podTopDescription, Description: podTopDescription,
Flags: podTopFlags, Flags: sortFlags(podTopFlags),
Action: podTopCmd, Action: podTopCmd,
ArgsUsage: "POD-NAME [format descriptors]", ArgsUsage: "POD-NAME [format descriptors]",
SkipArgReorder: true, SkipArgReorder: true,

View File

@ -25,7 +25,7 @@ var (
Name: "unpause", Name: "unpause",
Usage: "Unpause one or more pods", Usage: "Unpause one or more pods",
Description: podUnpauseDescription, Description: podUnpauseDescription,
Flags: podUnpauseFlags, Flags: sortFlags(podUnpauseFlags),
Action: podUnpauseCmd, Action: podUnpauseCmd,
ArgsUsage: "POD-NAME|POD-ID [POD-NAME|POD-ID ...]", ArgsUsage: "POD-NAME|POD-ID [POD-NAME|POD-ID ...]",
UseShortOptionHandling: true, UseShortOptionHandling: true,

View File

@ -29,7 +29,7 @@ var (
Name: "port", Name: "port",
Usage: "List port mappings or a specific mapping for the container", Usage: "List port mappings or a specific mapping for the container",
Description: portDescription, Description: portDescription,
Flags: portFlags, Flags: sortFlags(portFlags),
Action: portCmd, Action: portCmd,
ArgsUsage: "CONTAINER-NAME [mapping]", ArgsUsage: "CONTAINER-NAME [mapping]",
OnUsageError: usageErrorHandler, OnUsageError: usageErrorHandler,

View File

@ -182,7 +182,7 @@ var (
Name: "ps", Name: "ps",
Usage: "List containers", Usage: "List containers",
Description: psDescription, Description: psDescription,
Flags: psFlags, Flags: sortFlags(psFlags),
Action: psCmd, Action: psCmd,
ArgsUsage: "", ArgsUsage: "",
UseShortOptionHandling: true, UseShortOptionHandling: true,

View File

@ -54,7 +54,7 @@ specified, the image with the 'latest' tag (if it exists) is pulled
Name: "pull", Name: "pull",
Usage: "Pull an image from a registry", Usage: "Pull an image from a registry",
Description: pullDescription, Description: pullDescription,
Flags: pullFlags, Flags: sortFlags(pullFlags),
Action: pullCmd, Action: pullCmd,
ArgsUsage: "", ArgsUsage: "",
OnUsageError: usageErrorHandler, OnUsageError: usageErrorHandler,

View File

@ -70,7 +70,7 @@ var (
Name: "push", Name: "push",
Usage: "Push an image to a specified destination", Usage: "Push an image to a specified destination",
Description: pushDescription, Description: pushDescription,
Flags: pushFlags, Flags: sortFlags(pushFlags),
Action: pushCmd, Action: pushCmd,
ArgsUsage: "IMAGE DESTINATION", ArgsUsage: "IMAGE DESTINATION",
OnUsageError: usageErrorHandler, OnUsageError: usageErrorHandler,

View File

@ -18,7 +18,7 @@ var (
Name: "refresh", Name: "refresh",
Usage: "Refresh container state", Usage: "Refresh container state",
Description: refreshDescription, Description: refreshDescription,
Flags: refreshFlags, Flags: sortFlags(refreshFlags),
Action: refreshCmd, Action: refreshCmd,
UseShortOptionHandling: true, UseShortOptionHandling: true,
OnUsageError: usageErrorHandler, OnUsageError: usageErrorHandler,

View File

@ -26,7 +26,7 @@ var (
Name: "restart", Name: "restart",
Usage: "Restart one or more containers", Usage: "Restart one or more containers",
Description: restartDescription, Description: restartDescription,
Flags: restartFlags, Flags: sortFlags(restartFlags),
Action: restartCmd, Action: restartCmd,
ArgsUsage: "CONTAINER [CONTAINER ...]", ArgsUsage: "CONTAINER [CONTAINER ...]",
UseShortOptionHandling: true, UseShortOptionHandling: true,

View File

@ -27,7 +27,7 @@ var (
Name: "restore", Name: "restore",
Usage: "Restores one or more containers from a checkpoint", Usage: "Restores one or more containers from a checkpoint",
Description: restoreDescription, Description: restoreDescription,
Flags: restoreFlags, Flags: sortFlags(restoreFlags),
Action: restoreCmd, Action: restoreCmd,
ArgsUsage: "CONTAINER-NAME [CONTAINER-NAME ...]", ArgsUsage: "CONTAINER-NAME [CONTAINER-NAME ...]",
} }

View File

@ -35,7 +35,7 @@ Running containers will not be removed without the -f option.
Name: "rm", Name: "rm",
Usage: "Remove one or more containers", Usage: "Remove one or more containers",
Description: rmDescription, Description: rmDescription,
Flags: rmFlags, Flags: sortFlags(rmFlags),
Action: rmCmd, Action: rmCmd,
ArgsUsage: "", ArgsUsage: "",
UseShortOptionHandling: true, UseShortOptionHandling: true,

View File

@ -29,7 +29,7 @@ var (
Description: rmiDescription, Description: rmiDescription,
Action: rmiCmd, Action: rmiCmd,
ArgsUsage: "IMAGE-NAME-OR-ID [...]", ArgsUsage: "IMAGE-NAME-OR-ID [...]",
Flags: rmiFlags, Flags: sortFlags(rmiFlags),
UseShortOptionHandling: true, UseShortOptionHandling: true,
OnUsageError: usageErrorHandler, OnUsageError: usageErrorHandler,
} }

View File

@ -27,7 +27,7 @@ var runCommand = cli.Command{
Name: "run", Name: "run",
Usage: "Run a command in a new container", Usage: "Run a command in a new container",
Description: runDescription, Description: runDescription,
Flags: runFlags, Flags: sortFlags(runFlags),
Action: runCmd, Action: runCmd,
ArgsUsage: "IMAGE [COMMAND [ARG...]]", ArgsUsage: "IMAGE [COMMAND [ARG...]]",
HideHelp: true, HideHelp: true,

View File

@ -18,7 +18,7 @@ var (
CLI *cli.Context CLI *cli.Context
testCommand = cli.Command{ testCommand = cli.Command{
Name: "test", Name: "test",
Flags: createFlags, Flags: sortFlags(createFlags),
Action: testCmd, Action: testCmd,
HideHelp: true, HideHelp: true,
} }

View File

@ -79,7 +79,7 @@ Executes a command as described by a container image label.
Name: "runlabel", Name: "runlabel",
Usage: "Execute the command described by an image label", Usage: "Execute the command described by an image label",
Description: runlabelDescription, Description: runlabelDescription,
Flags: runlabelFlags, Flags: sortFlags(runlabelFlags),
Action: runlabelCmd, Action: runlabelCmd,
ArgsUsage: "", ArgsUsage: "",
SkipArgReorder: true, SkipArgReorder: true,

View File

@ -53,7 +53,7 @@ var (
Name: "save", Name: "save",
Usage: "Save image to an archive", Usage: "Save image to an archive",
Description: saveDescription, Description: saveDescription,
Flags: saveFlags, Flags: sortFlags(saveFlags),
Action: saveCmd, Action: saveCmd,
ArgsUsage: "", ArgsUsage: "",
SkipArgReorder: true, SkipArgReorder: true,

View File

@ -55,7 +55,7 @@ var (
Name: "search", Name: "search",
Usage: "Search registry for image", Usage: "Search registry for image",
Description: searchDescription, Description: searchDescription,
Flags: searchFlags, Flags: sortFlags(searchFlags),
Action: searchCmd, Action: searchCmd,
ArgsUsage: "TERM", ArgsUsage: "TERM",
OnUsageError: usageErrorHandler, OnUsageError: usageErrorHandler,

View File

@ -41,7 +41,7 @@ var (
Name: "start", Name: "start",
Usage: "Start one or more containers", Usage: "Start one or more containers",
Description: startDescription, Description: startDescription,
Flags: startFlags, Flags: sortFlags(startFlags),
Action: startCmd, Action: startCmd,
ArgsUsage: "CONTAINER-NAME [CONTAINER-NAME ...]", ArgsUsage: "CONTAINER-NAME [CONTAINER-NAME ...]",
UseShortOptionHandling: true, UseShortOptionHandling: true,

View File

@ -52,7 +52,7 @@ var (
Name: "stats", Name: "stats",
Usage: "Display percentage of CPU, memory, network I/O, block I/O and PIDs for one or more containers", Usage: "Display percentage of CPU, memory, network I/O, block I/O and PIDs for one or more containers",
Description: statsDescription, Description: statsDescription,
Flags: statsFlags, Flags: sortFlags(statsFlags),
Action: statsCmd, Action: statsCmd,
ArgsUsage: "", ArgsUsage: "",
OnUsageError: usageErrorHandler, OnUsageError: usageErrorHandler,

View File

@ -35,7 +35,7 @@ var (
Name: "stop", Name: "stop",
Usage: "Stop one or more containers", Usage: "Stop one or more containers",
Description: stopDescription, Description: stopDescription,
Flags: stopFlags, Flags: sortFlags(stopFlags),
Action: stopCmd, Action: stopCmd,
ArgsUsage: "CONTAINER-NAME [CONTAINER-NAME ...]", ArgsUsage: "CONTAINER-NAME [CONTAINER-NAME ...]",
OnUsageError: usageErrorHandler, OnUsageError: usageErrorHandler,

View File

@ -42,7 +42,7 @@ the latest container.
Name: "top", Name: "top",
Usage: "Display the running processes of a container", Usage: "Display the running processes of a container",
Description: topDescription, Description: topDescription,
Flags: topFlags, Flags: sortFlags(topFlags),
Action: topCmd, Action: topCmd,
ArgsUsage: "CONTAINER-NAME [format descriptors]", ArgsUsage: "CONTAINER-NAME [format descriptors]",
SkipArgReorder: true, SkipArgReorder: true,

View File

@ -35,7 +35,7 @@ An unmount can be forced with the --force flag.
Aliases: []string{"unmount"}, Aliases: []string{"unmount"},
Usage: "Unmounts working container's root filesystem", Usage: "Unmounts working container's root filesystem",
Description: description, Description: description,
Flags: umountFlags, Flags: sortFlags(umountFlags),
Action: umountCmd, Action: umountCmd,
ArgsUsage: "CONTAINER-NAME-OR-ID", ArgsUsage: "CONTAINER-NAME-OR-ID",
OnUsageError: usageErrorHandler, OnUsageError: usageErrorHandler,

View File

@ -32,7 +32,7 @@ var (
Name: "varlink", Name: "varlink",
Usage: "Run varlink interface", Usage: "Run varlink interface",
Description: varlinkDescription, Description: varlinkDescription,
Flags: varlinkFlags, Flags: sortFlags(varlinkFlags),
Action: varlinkCmd, Action: varlinkCmd,
ArgsUsage: "VARLINK_URI", ArgsUsage: "VARLINK_URI",
OnUsageError: usageErrorHandler, OnUsageError: usageErrorHandler,

View File

@ -28,7 +28,7 @@ var (
Name: "wait", Name: "wait",
Usage: "Block on one or more containers", Usage: "Block on one or more containers",
Description: waitDescription, Description: waitDescription,
Flags: waitFlags, Flags: sortFlags(waitFlags),
Action: waitCmd, Action: waitCmd,
ArgsUsage: "CONTAINER-NAME [CONTAINER-NAME ...]", ArgsUsage: "CONTAINER-NAME [CONTAINER-NAME ...]",
OnUsageError: usageErrorHandler, OnUsageError: usageErrorHandler,