diff options
| author | Jeff Carr <[email protected]> | 2024-02-25 18:37:44 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-02-25 18:37:44 -0600 |
| commit | 7b4eb41de7e1c65c07dfc8f04f1263b3f258b268 (patch) | |
| tree | 0b8e95385cef782a74c554d53223c2ad55d60825 /argv.go | |
| parent | fd082d49659c722776d72b97b9eca9d4aab8b78e (diff) | |
better names with Init() vs New()v0.21.1
Diffstat (limited to 'argv.go')
| -rw-r--r-- | argv.go | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -0,0 +1,27 @@ +package main + +/* + enables GUI options and the debugger in your application +*/ + +import ( + "go.wit.com/dev/alexflint/arg" + "go.wit.com/lib/debugger" + "go.wit.com/log" +) + +var args struct { + Daemon bool `arg:"--daemon" help:"run without a gui"` +} + +func init() { + arg.MustParse(&args) + + if debugger.ArgDebug() { + log.Info("cmd line --debugger == true") + go func() { + log.Sleep(2) + debugger.DebugWindow() + }() + } +} |
