summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-09-09 08:40:49 -0500
committerJeff Carr <[email protected]>2025-09-09 08:40:49 -0500
commit8edefa6dadd1f4c3c43e145cc0431654720e2953 (patch)
tree2d1198269c341a59a9f23fedc3efea37716cb86d /main.go
parent18422bacebb2a99728abfcc1a1ee25cef42d2311 (diff)
fix something
Diffstat (limited to 'main.go')
-rw-r--r--main.go31
1 files changed, 24 insertions, 7 deletions
diff --git a/main.go b/main.go
index 9d9c016..205e90f 100644
--- a/main.go
+++ b/main.go
@@ -4,8 +4,9 @@ import (
"embed"
"os"
"path/filepath"
+ "time"
- "go.wit.com/gui"
+ "go.wit.com/dev/alexflint/arg"
"go.wit.com/lib/fhelp"
"go.wit.com/lib/gui/prep"
"go.wit.com/lib/gui/shell"
@@ -25,6 +26,9 @@ var argv args
func main() {
me = new(mainType)
+ 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 err := fhelp.ConfigureENV(); err != nil {
badExit(err)
@@ -53,8 +57,11 @@ func main() {
log.Info("found repo", me.repo.GetGoPath())
}
// build()
+ if argv.Show != nil {
+ log.Info("todo: show", me.repo.GetGoPath())
+ okExit("")
+ }
- me.myGui = prep.Gui() // prepares the GUI package for go-args
me.basicWindow = makebasicWindow()
// figure out where we are working from
@@ -94,10 +101,20 @@ func main() {
os.Exit(0)
}
- // only load teh toolkit if you get this far
- me.myGui.Start() // loads the GUI toolkit
- me.basicWindow.Show()
- // go will sit here until the window exits
- gui.Watchdog()
+ if argv.Gui != nil {
+ // only load teh toolkit if you get this far
+ me.myGui.Start() // loads the GUI toolkit
+ me.basicWindow.Show()
+ debug()
+ }
+ log.Info("go-deb: nothing to do in argv")
os.Exit(0)
}
+
+func debug() {
+ time.Sleep(2 * time.Second)
+ for {
+ log.Info("idle loop() todo: could check for things here")
+ time.Sleep(90 * time.Second)
+ }
+}