Skip to content

Commit 64a491b

Browse files
authored
Merge pull request #1554 from saschagrunert/cli-default
Remove CLI default values
2 parents 8fa1e83 + 0ce86f0 commit 64a491b

File tree

8 files changed

+4
-29
lines changed

8 files changed

+4
-29
lines changed

Diff for: cmd/crictl/config.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ CRICTL OPTIONS:
4646
Flags: []cli.Flag{
4747
&cli.StringFlag{
4848
Name: "get",
49-
Usage: "show the option value",
49+
Usage: "Show the option value",
5050
},
5151
&cli.StringSliceFlag{
5252
Name: "set",
53-
Usage: "set option (can specify multiple or separate values with commas: opt1=val1,opt2=val2)",
53+
Usage: "Set option (can specify multiple or separate values with commas: opt1=val1,opt2=val2)",
5454
},
5555
&cli.BoolFlag{
5656
Name: "list",
57-
Usage: "show all option value",
57+
Usage: "Show all option value",
5858
},
5959
},
6060
Action: func(c *cli.Context) error {

Diff for: cmd/crictl/container.go

+1-12
Original file line numberDiff line numberDiff line change
@@ -102,17 +102,14 @@ var createPullFlags = []cli.Flag{
102102
},
103103
&cli.StringFlag{
104104
Name: "creds",
105-
Value: "",
106105
Usage: "Use `USERNAME[:PASSWORD]` for accessing the registry",
107106
},
108107
&cli.StringFlag{
109108
Name: "auth",
110-
Value: "",
111109
Usage: "Use `AUTH_STRING` for accessing the registry. AUTH_STRING is a base64 encoded 'USERNAME[:PASSWORD]'",
112110
},
113111
&cli.StringFlag{
114112
Name: "username",
115-
Value: "",
116113
Usage: "Use `USERNAME` for accessing the registry. The password will be requested on the command line",
117114
},
118115
&cli.DurationFlag{
@@ -139,17 +136,14 @@ var runPullFlags = []cli.Flag{
139136
},
140137
&cli.StringFlag{
141138
Name: "creds",
142-
Value: "",
143139
Usage: "Use `USERNAME[:PASSWORD]` for accessing the registry",
144140
},
145141
&cli.StringFlag{
146142
Name: "auth",
147-
Value: "",
148143
Usage: "Use `AUTH_STRING` for accessing the registry. AUTH_STRING is a base64 encoded 'USERNAME[:PASSWORD]'",
149144
},
150145
&cli.StringFlag{
151146
Name: "username",
152-
Value: "",
153147
Usage: "Use `USERNAME` for accessing the registry. password will be requested",
154148
},
155149
&cli.StringFlag{
@@ -544,29 +538,24 @@ var listContainersCommand = &cli.Command{
544538
},
545539
&cli.StringFlag{
546540
Name: "id",
547-
Value: "",
548541
Usage: "Filter by container id",
549542
},
550543
&cli.StringFlag{
551544
Name: "name",
552-
Value: "",
553-
Usage: "filter by container name regular expression pattern",
545+
Usage: "Filter by container name regular expression pattern",
554546
},
555547
&cli.StringFlag{
556548
Name: "pod",
557549
Aliases: []string{"p"},
558-
Value: "",
559550
Usage: "Filter by pod id",
560551
},
561552
&cli.StringFlag{
562553
Name: "image",
563-
Value: "",
564554
Usage: "Filter by container image",
565555
},
566556
&cli.StringFlag{
567557
Name: "state",
568558
Aliases: []string{"s"},
569-
Value: "",
570559
Usage: "Filter by container state",
571560
},
572561
&cli.StringSliceFlag{

Diff for: cmd/crictl/container_stats.go

-2
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,11 @@ var statsCommand = &cli.Command{
6161
},
6262
&cli.StringFlag{
6363
Name: "id",
64-
Value: "",
6564
Usage: "Filter by container id",
6665
},
6766
&cli.StringFlag{
6867
Name: "pod",
6968
Aliases: []string{"p"},
70-
Value: "",
7169
Usage: "Filter by pod id",
7270
},
7371
&cli.StringSliceFlag{

Diff for: cmd/crictl/exec.go

-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ var runtimeExecCommand = &cli.Command{
5858
},
5959
&cli.Int64Flag{
6060
Name: "timeout",
61-
Value: 0,
6261
Usage: "Timeout in seconds",
6362
},
6463
&cli.BoolFlag{

Diff for: cmd/crictl/image.go

-4
Original file line numberDiff line numberDiff line change
@@ -57,25 +57,21 @@ var pullImageCommand = &cli.Command{
5757
Flags: []cli.Flag{
5858
&cli.StringFlag{
5959
Name: "creds",
60-
Value: "",
6160
Usage: "Use `USERNAME[:PASSWORD]` for accessing the registry",
6261
EnvVars: []string{"CRICTL_CREDS"},
6362
},
6463
&cli.StringFlag{
6564
Name: "auth",
66-
Value: "",
6765
Usage: "Use `AUTH_STRING` for accessing the registry. AUTH_STRING is a base64 encoded 'USERNAME[:PASSWORD]'",
6866
EnvVars: []string{"CRICTL_AUTH"},
6967
},
7068
&cli.StringFlag{
7169
Name: "username",
7270
Aliases: []string{"u"},
73-
Value: "",
7471
Usage: "Use `USERNAME` for accessing the registry. The password will be requested on the command line",
7572
},
7673
&cli.StringFlag{
7774
Name: "pod-config",
78-
Value: "",
7975
Usage: "Use `pod-config.[json|yaml]` to override the pull c",
8076
TakesFile: true,
8177
},

Diff for: cmd/crictl/logs.go

-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ var logsCommand = &cli.Command{
6868
},
6969
&cli.StringFlag{
7070
Name: "since",
71-
Value: "",
7271
Usage: "Show logs since timestamp (e.g. 2013-01-02T13:23:37) or relative (e.g. 42m for 42 minutes)",
7372
},
7473
&cli.BoolFlag{

Diff for: cmd/crictl/pod_stats.go

-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ var podStatsCommand = &cli.Command{
5555
Flags: []cli.Flag{
5656
&cli.StringFlag{
5757
Name: "id",
58-
Value: "",
5958
Usage: "Filter by pod id",
6059
},
6160
&cli.StringSliceFlag{

Diff for: cmd/crictl/sandbox.go

-5
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ var runPodCommand = &cli.Command{
6767
&cli.DurationFlag{
6868
Name: "cancel-timeout",
6969
Aliases: []string{"T"},
70-
Value: 0,
7170
Usage: "Seconds to wait for a run pod sandbox request to complete before cancelling the request",
7271
},
7372
},
@@ -250,23 +249,19 @@ var listPodCommand = &cli.Command{
250249
Flags: []cli.Flag{
251250
&cli.StringFlag{
252251
Name: "id",
253-
Value: "",
254252
Usage: "filter by pod id",
255253
},
256254
&cli.StringFlag{
257255
Name: "name",
258-
Value: "",
259256
Usage: "filter by pod name regular expression pattern",
260257
},
261258
&cli.StringFlag{
262259
Name: "namespace",
263-
Value: "",
264260
Usage: "filter by pod namespace regular expression pattern",
265261
},
266262
&cli.StringFlag{
267263
Name: "state",
268264
Aliases: []string{"s"},
269-
Value: "",
270265
Usage: "filter by pod state",
271266
},
272267
&cli.StringSliceFlag{

0 commit comments

Comments
 (0)