summaryrefslogtreecommitdiff
path: root/argv.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-02-25 18:37:44 -0600
committerJeff Carr <[email protected]>2024-02-25 18:37:44 -0600
commit7b4eb41de7e1c65c07dfc8f04f1263b3f258b268 (patch)
tree0b8e95385cef782a74c554d53223c2ad55d60825 /argv.go
parentfd082d49659c722776d72b97b9eca9d4aab8b78e (diff)
better names with Init() vs New()v0.21.1
Diffstat (limited to 'argv.go')
-rw-r--r--argv.go27
1 files changed, 27 insertions, 0 deletions
diff --git a/argv.go b/argv.go
new file mode 100644
index 0000000..324e7d7
--- /dev/null
+++ b/argv.go
@@ -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()
+ }()
+ }
+}