test callback()

This commit is contained in:
Jeff Carr 2025-09-09 03:54:32 -05:00
parent b8cafe1bd3
commit 3e4383e131
1 changed files with 10 additions and 1 deletions

11
gui.go
View File

@ -17,6 +17,7 @@ are the generic default command line arguments for the 'GUI' package
*/ */
type ArgsGui struct { type ArgsGui struct {
GuiPluginHack string `arg:"--gui-check-plugin" help:"hack to verify GO plugins load"` GuiPluginHack string `arg:"--gui-check-plugin" help:"hack to verify GO plugins load"`
GuiVerbose bool `arg:"--gui-verbose" help:"enable all logging"`
} }
/* /*
@ -48,10 +49,17 @@ func ArgToolkit() string {
func postMustParse(s string) string { func postMustParse(s string) string {
switch s { switch s {
case "PluginHack": case "PluginHack":
return argGui.GuiPluginHack case "VERBOSE":
if argGui.GuiVerbose == true {
return "true"
}
return "false"
case "FILE":
return "someplugin"
default: default:
return "" return ""
} }
return "unknown"
} }
func Gui() *gui.Node { func Gui() *gui.Node {
@ -60,6 +68,7 @@ func Gui() *gui.Node {
os.Exit(0) os.Exit(0)
} }
arg.Register(&argGui) arg.Register(&argGui)
gui.InitArg()
return gui.PreInit(postMustParse) return gui.PreInit(postMustParse)
} }