diff options
| author | Jeff Carr <[email protected]> | 2025-10-21 06:41:28 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-21 06:41:28 -0500 |
| commit | 5036409ef63bc4bf9b63d7dd0cf06cdcb2285ab9 (patch) | |
| tree | 725760124ab53cc1475fe0b4ca5fa0a62078a209 /config.Panic.go | |
| parent | 93a56f29dbf3bcceb3a58d59bc996845b762cb31 (diff) | |
use lib/ENV
Diffstat (limited to 'config.Panic.go')
| -rw-r--r-- | config.Panic.go | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/config.Panic.go b/config.Panic.go deleted file mode 100644 index 3e2e246..0000000 --- a/config.Panic.go +++ /dev/null @@ -1,37 +0,0 @@ -package config - -import "google.golang.org/protobuf/proto" - -func GetPanic(flag string) string { - saveMu.Lock() - defer saveMu.Unlock() - if configPB == nil { - configPanic(flag) - } - found := configPB.findByKey(flag) - if found == nil { - configPanic(flag) - } - return found.Value -} - -func configPanic(varname string) { - saveMu.Lock() - defer saveMu.Unlock() - if configPB == nil { - panic("config file is nil") - } - panic("config name '" + varname + "' not found") -} - -// should this be a function? -func LoadPanicPB(pb proto.Message) error { - fullname, err := GetFilename(pb) - if err != nil { - panic("config.LoadPB() err") - } - if fullname == "" { - panic("config.LoadPB() got blank filename = ''") - } - return LoadPB(pb) -} |
