diff options
| author | Jeff Carr <[email protected]> | 2024-01-03 11:18:56 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-01-03 11:18:56 -0600 |
| commit | 6b49c4139e0ec885d8790f6dba794f2c7272c074 (patch) | |
| tree | cfea3a863661c7bc6a1dfc9eb4ba9a78c0ab65f6 /args.go | |
start moving this stuff out
Diffstat (limited to 'args.go')
| -rw-r--r-- | args.go | 34 |
1 files changed, 34 insertions, 0 deletions
@@ -0,0 +1,34 @@ +package debugger + +// initializes logging and command line options + +import ( + arg "github.com/alexflint/go-arg" + log "go.wit.com/log" +) + +var INFO log.LogFlag +var POLL log.LogFlag +var BUG log.LogFlag +var argDebugger ArgsDebugger + +// This struct can be used with the go-arg package +type ArgsDebugger struct { + Debugger bool `arg:"--debugger" help:"open the debugger window"` +} + +func init() { + arg.Register(&argDebugger) + + INFO.B = false + INFO.Name = "INFO" + INFO.Subsystem = "bugger" + INFO.Desc = "simple debugging Info()" + INFO.Register() + + POLL.B = false + POLL.Name = "POLL" + POLL.Subsystem = "bugger" + POLL.Desc = "watch the debugger poll things" + POLL.Register() +} |
