diff options
| author | Jeff Carr <[email protected]> | 2025-10-26 08:31:13 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-26 08:31:13 -0500 |
| commit | 042fac23113c134b3615939b0836263fd12b3bd1 (patch) | |
| tree | b46492b135af76e0e045e887c6a5ea941516c490 /init.go | |
| parent | cfee0dad2418f8e800d15edd3e6b32cebd1119dc (diff) | |
new argv Init()
Diffstat (limited to 'init.go')
| -rw-r--r-- | init.go | 24 |
1 files changed, 21 insertions, 3 deletions
@@ -4,13 +4,17 @@ import ( "fmt" "time" + "github.com/google/uuid" "go.wit.com/lib/cobol" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" ) -// gets APPNAME, BUILDTIME and VERSION from the application -func initAppname() { +func Init(dest any, APPNAME string, anyString string, VERSION string) { + me = new(AutoType) + me.pb = new(Argv) + PB = me.pb + app := new(App) - APPNAME, anyString, VERSION := me.initArgvFunc() app.APPNAME = APPNAME app.VERSION = VERSION // @@ -32,4 +36,18 @@ func initAppname() { fmt.Printf("TIME initAppname() ERR=(%v) anyString=(%v) GetTime.BUILTIME=(%v) app.BUILDTIME=(%v)\n", err, anyString, BUILDTIME, app.BUILDTIME) } me.pb.AppInfo = app + + fakeStdout() + 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) + + // do autocomplete + Autocomplete() } |
