summaryrefslogtreecommitdiff
path: root/init.go
diff options
context:
space:
mode:
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
+}