diff options
| author | Jeff Carr <[email protected]> | 2023-12-31 02:49:26 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-12-31 02:49:26 -0600 |
| commit | b0b8b762ab98355d39750ebee5ef9f9feaa3c0ba (patch) | |
| tree | 4a008ab4cf3bad03db9c60327104bc3b6da7f2c3 /args.go | |
| parent | 2a6ac8ccab17c7749cf12c951fccf42aa26da6cb (diff) | |
use go-arg package. start migrating more code over
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'args.go')
| -rw-r--r-- | args.go | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -12,6 +12,7 @@ var argLog ArgLog // This struct can be used with the go-arg package type ArgLog struct { + LogDebug bool `arg:"--log-debug" help:"show the log gui"` LogTmp bool `arg:"--log-tmp" help:"send all output /tmp"` LogStdout bool `arg:"--log-stdout" help:"send all output to STDOUT"` LogQuiet bool `arg:"--log-quiet" help:"suppress all output"` @@ -20,3 +21,8 @@ type ArgLog struct { func init() { arg.Register(&argLog) } + +// returns true if --log-debug was passed from the command line +func ArgDebug() bool { + return argLog.LogDebug +} |
