Skip to content

Commit d8e840e

Browse files
committed
Use cli default value for list format
For consistency. Signed-off-by: Qiang Huang <[email protected]>
1 parent afaa21f commit d8e840e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

list.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
"github.com/opencontainers/runc/libcontainer/utils"
1717
)
1818

19-
const formatOptions = `table(default) or json`
19+
const formatOptions = `table or json`
2020

2121
// containerState represents the platform agnostic pieces relating to a
2222
// running container's status and state
@@ -41,7 +41,7 @@ var listCommand = cli.Command{
4141
Flags: []cli.Flag{
4242
cli.StringFlag{
4343
Name: "format, f",
44-
Value: "",
44+
Value: "table",
4545
Usage: `select one of: ` + formatOptions,
4646
},
4747
cli.BoolFlag{
@@ -63,7 +63,7 @@ var listCommand = cli.Command{
6363
}
6464

6565
switch context.String("format") {
66-
case "", "table":
66+
case "table":
6767
w := tabwriter.NewWriter(os.Stdout, 12, 1, 3, ' ', 0)
6868
fmt.Fprint(w, "ID\tPID\tSTATUS\tBUNDLE\tCREATED\n")
6969
for _, item := range s {

man/runc-list.8.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
runc list [command options] [arguments...]
66

77
# OPTIONS
8-
--format value, -f value select one of: table(default) or json
8+
--format value, -f value select one of: table or json (default: "table")
99
--quiet, -q display only container IDs

0 commit comments

Comments
 (0)