Skip to content

Commit 2766b1e

Browse files
authored
all flag use EnvVars (#237)
1 parent f15f69c commit 2766b1e

File tree

1 file changed

+23
-17
lines changed

1 file changed

+23
-17
lines changed

pkg/app.go

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -70,36 +70,42 @@ OPTIONS:
7070
Usage: "For CIS-DI-0010. You can add acceptable file extensions. e.g) -ae pem -ae log",
7171
},
7272
cli.StringFlag{
73-
Name: "format, f",
74-
Value: "",
75-
Usage: "format (json)",
73+
Name: "format, f",
74+
Value: "",
75+
EnvVar: "DOCKLE_OUTPUT_FORMAT",
76+
Usage: "output format (list, json, sarif)",
7677
},
7778
cli.StringFlag{
78-
Name: "output, o",
79-
Usage: "output file name",
79+
Name: "output, o",
80+
EnvVar: "DOCKLE_OUTPUT_FILE",
81+
Usage: "output file name",
8082
},
8183
cli.IntFlag{
82-
Name: "exit-code, c",
83-
Usage: "exit code when alert were found",
84-
Value: 0,
84+
Name: "exit-code, c",
85+
Value: 0,
86+
EnvVar: "DOCKLE_EXIT_CODE",
87+
Usage: "exit code when alert were found",
8588
},
8689
cli.StringFlag{
87-
Name: "exit-level, l",
88-
Usage: "change ABEND level when use exit-code=1",
89-
Value: "WARN",
90+
Name: "exit-level, l",
91+
Value: "WARN",
92+
EnvVar: "DOCKLE_EXIT_LEVEL",
93+
Usage: "change ABEND level when use exit-code=1",
9094
},
9195
cli.BoolFlag{
92-
Name: "debug, d",
93-
Usage: "debug mode",
96+
Name: "debug, d",
97+
EnvVar: "DOCKLE_DEBUG",
98+
Usage: "debug mode",
9499
},
95100
cli.BoolFlag{
96-
Name: "quiet, q",
97-
Usage: "suppress log output",
101+
Name: "quiet, q",
102+
EnvVar: "DOCKLE_QUIET",
103+
Usage: "suppress log output",
98104
},
99105
cli.BoolFlag{
100106
Name: "no-color",
101107
EnvVar: "NO_COLOR",
102-
Usage: "suppress log output",
108+
Usage: "disabling color output",
103109
},
104110
cli.BoolFlag{
105111
Name: "version-check",
@@ -117,7 +123,7 @@ OPTIONS:
117123
cli.BoolFlag{
118124
Name: "use-xdg, x",
119125
EnvVar: "USE_XDG",
120-
Usage: "Docker daemon host file XDG_RUNTIME_DIR",
126+
Usage: "Docker daemon host file XDG_RUNTIME_DIR",
121127
},
122128
cli.StringFlag{
123129
Name: "host",

0 commit comments

Comments
 (0)