Merge pull request #1012 from miaoyq/add-format-description-for-ctr-info

Add 'ArgsUsage' for ctr sub-cmds
This commit is contained in:
Phil Estes 2017-06-15 11:12:53 -04:00 committed by GitHub
commit f2963f7562
5 changed files with 15 additions and 10 deletions

View File

@ -9,8 +9,9 @@ import (
) )
var checkpointCommand = cli.Command{ var checkpointCommand = cli.Command{
Name: "checkpoint", Name: "checkpoint",
Usage: "checkpoint a container", Usage: "checkpoint a container",
ArgsUsage: "CONTAINER",
Flags: []cli.Flag{ Flags: []cli.Flag{
cli.BoolFlag{ cli.BoolFlag{
Name: "exit", Name: "exit",

View File

@ -10,8 +10,9 @@ import (
) )
var execCommand = cli.Command{ var execCommand = cli.Command{
Name: "exec", Name: "exec",
Usage: "execute additional processes in an existing container", Usage: "execute additional processes in an existing container",
ArgsUsage: "CONTAINER CMD [ARG...]",
Flags: []cli.Flag{ Flags: []cli.Flag{
cli.StringFlag{ cli.StringFlag{
Name: "cwd", Name: "cwd",

View File

@ -10,8 +10,9 @@ import (
) )
var infoCommand = cli.Command{ var infoCommand = cli.Command{
Name: "info", Name: "info",
Usage: "get info about a container", Usage: "get info about a container",
ArgsUsage: "CONTAINER",
Action: func(context *cli.Context) error { Action: func(context *cli.Context) error {
var ( var (
ctx, cancel = appContext(context) ctx, cancel = appContext(context)

View File

@ -6,8 +6,9 @@ import (
) )
var killCommand = cli.Command{ var killCommand = cli.Command{
Name: "kill", Name: "kill",
Usage: "signal a container (default: SIGTERM)", Usage: "signal a container (default: SIGTERM)",
ArgsUsage: "CONTAINER",
Flags: []cli.Flag{ Flags: []cli.Flag{
cli.StringFlag{ cli.StringFlag{
Name: "signal, s", Name: "signal, s",

View File

@ -10,8 +10,9 @@ import (
) )
var psCommand = cli.Command{ var psCommand = cli.Command{
Name: "ps", Name: "ps",
Usage: "list processes for container", Usage: "list processes for container",
ArgsUsage: "CONTAINER",
Action: func(context *cli.Context) error { Action: func(context *cli.Context) error {
var ( var (
id = context.Args().First() id = context.Args().First()