summaryrefslogtreecommitdiff
path: root/etc.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-28 21:59:48 -0500
committerJeff Carr <[email protected]>2025-10-28 21:59:48 -0500
commit200b76da8a0dd95b524d44e90a92106a9699d9fd (patch)
treefbd9110e1b464278c5b9faa93639fe887494effd /etc.go
parent05d09b7584b4cd18676c68dd161142044437a7af (diff)
allow libraries to load a specific app env config fileHEADv0.0.13v0.0.12v0.0.11masterdevel
Diffstat (limited to 'etc.go')
-rw-r--r--etc.go10
1 files changed, 4 insertions, 6 deletions
diff --git a/etc.go b/etc.go
index 4e7e7ec..9f6846d 100644
--- a/etc.go
+++ b/etc.go
@@ -5,14 +5,12 @@ import (
"os"
"path/filepath"
"strings"
-
- "go.wit.com/log"
)
var ErrInit error = fmt.Errorf("lib/env has not been initialized")
func LoadEtc() error {
- log.Info("Starting LoadEtc() with appname:", APPNAME)
+ fmt.Printf("Starting LoadEtc() with appname: %s\n", APPNAME)
if envPB == nil {
return ErrInit
}
@@ -21,19 +19,19 @@ func LoadEtc() error {
}
globPattern := filepath.Join("/etc/", APPNAME+".d", "*")
- log.Info("glob Pattern:", globPattern)
+ fmt.Printf("glob Pattern (%s)\n", globPattern)
files, err := filepath.Glob(globPattern)
if err != nil {
fmt.Printf("%s glob error (%v)\n", globPattern, err)
return err
}
- log.Info("found files:", files)
+ fmt.Printf("found files: %v\n", files)
for _, file := range files {
data, _ := os.ReadFile(file)
_, name := filepath.Split(file)
parseFileData("etc/"+name, string(data))
- log.Info("LoadEtc() file:", file)
+ fmt.Println("LoadEtc() file:", file)
}
return nil