summaryrefslogtreecommitdiff
path: root/structs.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-04 15:29:43 -0500
committerJeff Carr <[email protected]>2025-10-04 15:29:43 -0500
commitef0b7c74660c284a8e123b76874da6d0e322e192 (patch)
tree7112278936f6fcf176d78f3a10081e85b9b8b48a /structs.go
parent947ad21bb370ebb650e7296082d784c9ca3d27cb (diff)
smart exit function
Diffstat (limited to 'structs.go')
-rw-r--r--structs.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/structs.go b/structs.go
index d728fd8..2f07955 100644
--- a/structs.go
+++ b/structs.go
@@ -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
}