diff options
| author | Jeff Carr <[email protected]> | 2025-09-09 06:16:41 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-09-09 06:16:41 -0500 |
| commit | 8ab09243500576460a9e5b12cae0b997933d6577 (patch) | |
| tree | 07a8b5113c812f0cc31d301f2784ef9e48b92d90 /main.go | |
| parent | 58e2a02c5bffdab2eac0da83c3810f1d808da7df (diff) | |
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 30 |
1 files changed, 17 insertions, 13 deletions
@@ -18,7 +18,7 @@ import ( "github.com/google/uuid" "go.wit.com/dev/alexflint/arg" - "go.wit.com/gui" + "go.wit.com/lib/gui/prep" "go.wit.com/log" timestamppb "google.golang.org/protobuf/types/known/timestamppb" ) @@ -26,16 +26,19 @@ import ( var VERSION string var BUILDTIME string +var ARGNAME string = "gus" + //go:embed resources/* var resources embed.FS func main() { - var pp *arg.Parser - gui.InitArg() - pp = arg.MustParse(&argv) + me = new(gusconf) + prep.Bash(ARGNAME, argv.DoAutoComplete) // this line should be: prep.Bash(argv) + me.myGui = prep.Gui() // prepares the GUI package for go-args + me.pp = arg.MustParse(&argv) - if pp == nil { - pp.WriteHelp(os.Stdout) + if me.pp == nil { + me.pp.WriteHelp(os.Stdout) os.Exit(0) } log.Info("tmp hack", uuid.New().String()) @@ -66,16 +69,17 @@ func main() { os.Exit(0) } - if gui.NoGui() { - startGus() - startHTTP() - os.Exit(0) + startGus() + + if argv.Gui != nil { + me.myGui.Start() // loads the GUI toolkit + doGui() // start making our forge GUI } - startGus() + startHTTP() + os.Exit(0) + // debug() // sits here forever // go NewWatchdog() - go startHTTP() - doGui() } func startGus() { |
