diff options
| author | Jeff Carr <[email protected]> | 2025-10-04 15:29:43 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-04 15:29:43 -0500 |
| commit | ef0b7c74660c284a8e123b76874da6d0e322e192 (patch) | |
| tree | 7112278936f6fcf176d78f3a10081e85b9b8b48a /structs.go | |
| parent | 947ad21bb370ebb650e7296082d784c9ca3d27cb (diff) | |
smart exit function
Diffstat (limited to 'structs.go')
| -rw-r--r-- | structs.go | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -6,6 +6,7 @@ package main import ( "os" "sync" + "time" "go.wit.com/lib/gui/prep" "go.wit.com/lib/protobuf/forgepb" @@ -17,7 +18,8 @@ var me *mainType // this app's variables type mainType struct { once sync.Once // one-time initialized data - auto *prep.Auto // more experiments for bash handling + start time.Time // what the app starts (used for timing automated runs) + sh *prep.Auto // more experiments for bash handling forge *forgepb.Forge // your customized repo preferences and settings machine *zoopb.Machine // your customized repo preferences and settings homedir string // where the user homedir is @@ -39,7 +41,8 @@ func initMachine() { func initMain() { // autocomplete must be processed before there is anything sent to STDOUT or STDERR - me.auto = prep.Bash3(&argv) // add support for bash autocomplete with go-arg + me.sh = prep.Bash3(&argv) // add support for bash autocomplete with go-arg me.homedir, _ = os.UserHomeDir() // store shortcut here todo: add better logic - dumpDebug() // tinkering + me.start = time.Now() + dumpDebug() // tinkering } |
