diff options
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 21 |
1 files changed, 7 insertions, 14 deletions
@@ -10,7 +10,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/lib/protobuf/virtpb" "go.wit.com/log" ) @@ -26,18 +26,10 @@ var resources embed.FS func main() { me = new(virtigoT) - gui.InitArg() + 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 argv.Bash { - argv.doBash() - os.Exit(0) - } - if len(argv.BashAuto) != 0 { - argv.doBashAuto() - os.Exit(0) - } - if me.pp == nil { me.pp.WriteHelp(os.Stdout) os.Exit(0) @@ -64,6 +56,8 @@ func main() { exit(doDroplet()) } + me.myGui.Start() // loads the GUI toolkit + if argv.Admin { err := me.clusters.ConfigLoad() if err != nil { @@ -105,7 +99,6 @@ func main() { okExit("") } - // sit here - go startHTTP() - doGui() + doGui() // start making our forge GUI + startHTTP() // sit here forever } |
