From d8e840e8f9b654a2810c0a366baea085a73d0063 Mon Sep 17 00:00:00 2001 From: Qiang Huang Date: Sat, 4 Jun 2016 16:57:13 +0800 Subject: [PATCH] Use cli default value for list format For consistency. Signed-off-by: Qiang Huang --- list.go | 6 +++--- man/runc-list.8.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/list.go b/list.go index 7214b451..9da34bb3 100644 --- a/list.go +++ b/list.go @@ -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 { diff --git a/man/runc-list.8.md b/man/runc-list.8.md index 26db0ff9..819ace89 100644 --- a/man/runc-list.8.md +++ b/man/runc-list.8.md @@ -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