summaryrefslogtreecommitdiff
path: root/args.go
diff options
context:
space:
mode:
Diffstat (limited to 'args.go')
-rw-r--r--args.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/args.go b/args.go
new file mode 100644
index 0000000..886880e
--- /dev/null
+++ b/args.go
@@ -0,0 +1,22 @@
+package gui
+
+import (
+ arg "github.com/alexflint/go-arg"
+)
+
+var guiArg GuiArgs
+
+// This struct can be used with the go-arg package
+type GuiArgs struct {
+ Gui string `arg:"--gui" help:"Use this gui toolkit [andlabs,gocui,nocui]"`
+ GuiDebug bool `arg:"--gui-debug" help:"open the GUI debugger"`
+ GuiVerbose bool `arg:"--gui-verbose" help:"enable all logging"`
+}
+
+func init() {
+ arg.Register(&guiArg)
+}
+
+func GetArg(a string) bool {
+ return guiArg.GuiDebug
+}