MCPcopy Create free account
hub / github.com/PasarGuard/node / GetEnvAsBool

Function GetEnvAsBool

config/config.go:91–97  ·  view source on GitHub ↗
(name string, defaultVal bool)

Source from the content-addressed store, hash-verified

89}
90
91func GetEnvAsBool(name string, defaultVal bool) bool {
92 valStr := GetEnv(name, "")
93 if val, err := strconv.ParseBool(valStr); err == nil {
94 return val
95 }
96 return defaultVal
97}
98
99func GetEnvAsInt(name string, defaultVal int) int {
100 valStr := GetEnv(name, "")

Callers 1

LoadFunction · 0.85

Calls 1

GetEnvFunction · 0.85

Tested by

no test coverage detected