summaryrefslogtreecommitdiff
path: root/init.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-28 20:26:35 -0500
committerJeff Carr <[email protected]>2025-10-28 20:26:35 -0500
commitd01a280e32cca2809c35d02cef25cc6c691a0e1e (patch)
treeb02cc25e2ea8fb5d0383f2cf7a3ca24b65a62e71 /init.go
parent69a8ae0bdc33e898bee5046bfee73692879f5297 (diff)
more dbg output cleanups
Diffstat (limited to 'init.go')
-rw-r--r--init.go12
1 files changed, 5 insertions, 7 deletions
diff --git a/init.go b/init.go
index 1c056d1..7c9e9f8 100644
--- a/init.go
+++ b/init.go
@@ -15,6 +15,11 @@ func Init(dest any, APPNAME string, anyString string, VERSION string) {
PB = me.pb
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
+
// needed by bash for autocomplete, help & debugging
Stdout = NewStringWriter(&PB.Stdout) // bash uses this to match strings
Stderr = NewStringWriter(&PB.Stderr) // bash dumps this as "help" about application options
@@ -43,13 +48,6 @@ func Init(dest any, APPNAME string, anyString string, VERSION string) {
}
me.pb.AppInfo = app
- // shouldn't be needed but is because this code doesn't work right yet
- me.pb.Uuid = uuid.New().String()
-
- // set the start time of the binary
- now := time.Now()
- me.pb.Ctime = timestamppb.New(now)
-
// makes sure the application has the
// needed functions defined, otherwise dies
verifyApplication(dest)