summaryrefslogtreecommitdiff
path: root/cmds/plugin-consoleonly/args.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmds/plugin-consoleonly/args.go')
-rw-r--r--cmds/plugin-consoleonly/args.go31
1 files changed, 31 insertions, 0 deletions
diff --git a/cmds/plugin-consoleonly/args.go b/cmds/plugin-consoleonly/args.go
new file mode 100644
index 0000000..dc4a322
--- /dev/null
+++ b/cmds/plugin-consoleonly/args.go
@@ -0,0 +1,31 @@
+// This creates a simple hello world window
+package main
+
+import (
+ "log"
+ "git.wit.org/wit/gui"
+ arg "github.com/alexflint/go-arg"
+)
+
+type LogOptions struct {
+ LogFile string
+ Verbose bool
+ User string `arg:"env:USER"`
+}
+
+var args struct {
+ LogOptions
+ gui.GuiArgs
+}
+
+func init() {
+ arg.MustParse(&args)
+ log.Println("Toolkit = ", args.Toolkit)
+
+ if (args.GuiDebug) {
+ gui.DebugWindow()
+ }
+ if (args.GuiVerbose) {
+ gui.SetDebug(true)
+ }
+}