Merge pull request #879 from hqhq/list_use_cli_default

Use cli default value for list format
This commit is contained in:
Mrunal Patel
2016-06-13 16:06:13 -07:00
committed by GitHub
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -16,7 +16,7 @@ import (
"github.com/urfave/cli"
)
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 {
+1 -1
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