diff options
Diffstat (limited to 'init.go')
| -rw-r--r-- | init.go | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -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) |
