Use cli default value for list format

For consistency.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
This commit is contained in:
Qiang Huang 2016-06-04 16:57:13 +08:00
parent afaa21f79a
commit d8e840e8f9
2 changed files with 4 additions and 4 deletions

View File

@ -16,7 +16,7 @@ import (
"github.com/opencontainers/runc/libcontainer/utils"
)
const formatOptions = `table(default) or json`
const formatOptions = `table or json`
// containerState represents the platform agnostic pieces relating to a
// running container's status and state
@ -41,7 +41,7 @@ var listCommand = cli.Command{
Flags: []cli.Flag{
cli.StringFlag{
Name: "format, f",
Value: "",
Value: "table",
Usage: `select one of: ` + formatOptions,
},
cli.BoolFlag{
@ -63,7 +63,7 @@ var listCommand = cli.Command{
}
switch context.String("format") {
case "", "table":
case "table":
w := tabwriter.NewWriter(os.Stdout, 12, 1, 3, ' ', 0)
fmt.Fprint(w, "ID\tPID\tSTATUS\tBUNDLE\tCREATED\n")
for _, item := range s {

View File

@ -5,5 +5,5 @@
runc list [command options] [arguments...]
# OPTIONS
--format value, -f value select one of: table(default) or json
--format value, -f value select one of: table or json (default: "table")
--quiet, -q display only container IDs