summaryrefslogtreecommitdiff
path: root/init.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-28 23:46:51 -0500
committerJeff Carr <[email protected]>2025-10-28 23:46:51 -0500
commitf3fa28a0a093c3e22ecacac914854523545d94f3 (patch)
tree8636b15f76766c3acffc8ca251d61ec57d914007 /init.go
parentbca3f42ae8ddf7e56c93a143b915a8dc9f3326f4 (diff)
just make PB global until argv is worked out
Diffstat (limited to 'init.go')
-rw-r--r--init.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/init.go b/init.go
index 7c9e9f8..5ec40ff 100644
--- a/init.go
+++ b/init.go
@@ -11,14 +11,14 @@ import (
func Init(dest any, APPNAME string, anyString string, VERSION string) {
me = new(AutoType)
- me.pb = new(Argv)
- PB = me.pb
+ PB = new(Argv)
+ me.all = NewArgvs()
me.debug = true
// set the start time of the binary
now := time.Now()
PB.Ctime = timestamppb.New(now)
- me.pb.Uuid = uuid.New().String() // todo: add options to track this
+ PB.Uuid = uuid.New().String() // todo: add options to track this
// needed by bash for autocomplete, help & debugging
Stdout = NewStringWriter(&PB.Stdout) // bash uses this to match strings
@@ -46,7 +46,7 @@ func Init(dest any, APPNAME string, anyString string, VERSION string) {
app.BUILDTIME = anyString
fmt.Printf("TIME initAppname() ERR=(%v) anyString=(%v) GetTime.BUILTIME=(%v) app.BUILDTIME=(%v)\n", err, anyString, BUILDTIME, app.BUILDTIME)
}
- me.pb.AppInfo = app
+ PB.AppInfo = app
// makes sure the application has the
// needed functions defined, otherwise dies