diff options
| author | Jeff Carr <[email protected]> | 2025-08-16 16:24:03 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-08-16 21:50:27 -0500 |
| commit | e2783ce0699b0867209a8a024e7aa1f3d187b76f (patch) | |
| tree | 22286babadb953e8fe8c2e0a395dbeb71db0e14f /init.go | |
| parent | 97f0204f5a85ede861ae4d43b3173d38d70725f5 (diff) | |
check plugins with Exec()v0.22.46
Diffstat (limited to 'init.go')
| -rw-r--r-- | init.go | 32 |
1 files changed, 20 insertions, 12 deletions
@@ -2,7 +2,6 @@ package gui import ( "errors" - "fmt" "os" "runtime/debug" @@ -38,7 +37,7 @@ func initNew() { me.guiChan = make(chan widget.Action, 1) version, err := getGuiVersion() - fmt.Println("GO GUI version", version, showVersion()+"<Bromeliaceae>", err) + log.Println("GO GUI version", version, showVersion()+"<Bromeliaceae>", err) if version == "" { log.Warn("Warning: compiled without version", err) log.Sleep(1) @@ -77,16 +76,16 @@ func getGuiVersion() (string, error) { if tmp == nil { return "", errors.New("compiled without go module support") } - // fmt.Println("mod.Path = ", tmp.Path) - // fmt.Println("mod.Main.Path = ", tmp.Main.Path) - // fmt.Println("mod.Main.Version = ", tmp.Main.Version) - // fmt.Println("mod.Main.Sum = ", tmp.Main.Sum) + // log.Println("mod.Path = ", tmp.Path) + // log.Println("mod.Main.Path = ", tmp.Main.Path) + // log.Println("mod.Main.Version = ", tmp.Main.Version) + // log.Println("mod.Main.Sum = ", tmp.Main.Sum) for _, value := range tmp.Deps { if value.Path == "go.wit.com/gui" { found = value.Version } - // fmt.Println("\tmod.Path = ", value.Path) - // fmt.Println("\tmod.Version = ", value.Version) + // log.Println("\tmod.Path = ", value.Path) + // log.Println("\tmod.Version = ", value.Version) } if found != "" { // log.Println("GUI build version:", found) @@ -282,7 +281,8 @@ func New() *Node { } */ if argGui.GuiTest != "" { - testPlugin() + // does os.Exec() and does not return + TestPluginAndExit() } initNew() @@ -296,6 +296,13 @@ func NoGui() bool { // try to load andlabs, if that doesn't work, fall back to the console func (n *Node) Default() *Node { var err error + // used to check if plugins load or not + if argGui.GuiCheck != "" { + // does os.Exec() and does not return + TestPluginAndExit() + os.Exit(0) + } + if argGui.NoGui { log.Log(WARN, "--no-gui chill Winston. I don't need no gui") return n @@ -415,12 +422,13 @@ func trapStdout() { origStderr = os.Stderr os.Stderr = guierrf + // maybe all this should be deleted now? println("TEST println") println("TEST println") println("TEST println") - fmt.Println("TEST fmt") - fmt.Println("TEST fmt") - fmt.Println("TEST fmt") + // maybe test fmt? or, maybe all this should be deleted now? + // fmt.Println("TEST fmt") + // fmt.Println("TEST fmt") log.Info("TEST log") log.Info("TEST log") log.Info("TEST log") |
