blob: cc973b144bc2a65412f4fc72586ea6cde846b10f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
package gui
import (
arg "github.com/alexflint/go-arg"
)
var argGui ArgsGui
// This struct can be used with the go-arg package
type ArgsGui struct {
GuiDebug bool `arg:"--gui-debug" help:"open the GUI debugger"`
GuiPlugin string `arg:"--gui" help:"Use this gui toolkit [andlabs,gocui,nocui]"`
GuiVerbose bool `arg:"--gui-verbose" help:"enable all logging"`
}
func init() {
arg.Register(&argGui)
}
// returns the toolkit
func ArgToolkit() string {
return argGui.GuiPlugin
}
// returns true if --gui-debug was passed from the command line
func ArgDebug() bool {
return argGui.GuiDebug
}
|