Skip to content

Commit

Permalink
all flag use EnvVars (#237)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomoyamachi committed Aug 18, 2023
1 parent f15f69c commit 2766b1e
Showing 1 changed file with 23 additions and 17 deletions.
40 changes: 23 additions & 17 deletions pkg/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,36 +70,42 @@ OPTIONS:
Usage: "For CIS-DI-0010. You can add acceptable file extensions. e.g) -ae pem -ae log",
},
cli.StringFlag{
Name: "format, f",
Value: "",
Usage: "format (json)",
Name: "format, f",
Value: "",
EnvVar: "DOCKLE_OUTPUT_FORMAT",
Usage: "output format (list, json, sarif)",
},
cli.StringFlag{
Name: "output, o",
Usage: "output file name",
Name: "output, o",
EnvVar: "DOCKLE_OUTPUT_FILE",
Usage: "output file name",
},
cli.IntFlag{
Name: "exit-code, c",
Usage: "exit code when alert were found",
Value: 0,
Name: "exit-code, c",
Value: 0,
EnvVar: "DOCKLE_EXIT_CODE",
Usage: "exit code when alert were found",
},
cli.StringFlag{
Name: "exit-level, l",
Usage: "change ABEND level when use exit-code=1",
Value: "WARN",
Name: "exit-level, l",
Value: "WARN",
EnvVar: "DOCKLE_EXIT_LEVEL",
Usage: "change ABEND level when use exit-code=1",
},
cli.BoolFlag{
Name: "debug, d",
Usage: "debug mode",
Name: "debug, d",
EnvVar: "DOCKLE_DEBUG",
Usage: "debug mode",
},
cli.BoolFlag{
Name: "quiet, q",
Usage: "suppress log output",
Name: "quiet, q",
EnvVar: "DOCKLE_QUIET",
Usage: "suppress log output",
},
cli.BoolFlag{
Name: "no-color",
EnvVar: "NO_COLOR",
Usage: "suppress log output",
Usage: "disabling color output",
},
cli.BoolFlag{
Name: "version-check",
Expand All @@ -117,7 +123,7 @@ OPTIONS:
cli.BoolFlag{
Name: "use-xdg, x",
EnvVar: "USE_XDG",
Usage: "Docker daemon host file XDG_RUNTIME_DIR",
Usage: "Docker daemon host file XDG_RUNTIME_DIR",
},
cli.StringFlag{
Name: "host",
Expand Down

0 comments on commit 2766b1e

Please sign in to comment.