summaryrefslogtreecommitdiff
path: root/init.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-21 06:40:48 -0500
committerJeff Carr <[email protected]>2025-10-21 06:40:48 -0500
commit3cf635e3c41be385b50778f7818fd50b006f1671 (patch)
treedba1a8c80e363d4f86a5f81623bc1f603e39318e /init.go
parent4d3349c453879051a7499fa07a97dfcb20b554ea (diff)
something to act like bash ENV
Diffstat (limited to 'init.go')
-rw-r--r--init.go26
1 files changed, 26 insertions, 0 deletions
diff --git a/init.go b/init.go
new file mode 100644
index 0000000..3df1e17
--- /dev/null
+++ b/init.go
@@ -0,0 +1,26 @@
+package ENV
+
+// this is an experiment at this point to
+// see how this turns out
+
+func Init(appname, version, buildtime string, fromargv []string) error {
+ APPNAME = appname
+ VERSION = version
+ BUILDTIME = buildtime
+ argv = fromargv
+
+ err := loadENV()
+ if err == nil {
+ envPB.Init = true
+ }
+ return err
+}
+
+func InitValid() bool {
+ if envPB == nil {
+ // todo: track that the application did not init
+ envPB = NewKeys()
+ return false
+ }
+ return envPB.Init
+}