MCPcopy Index your code
hub / github.com/PasarGuard/node / GetEnvAsInt

Function GetEnvAsInt

config/config.go:99–105  ·  view source on GitHub ↗
(name string, defaultVal int)

Source from the content-addressed store, hash-verified

97}
98
99func GetEnvAsInt(name string, defaultVal int) int {
100 valStr := GetEnv(name, "")
101 if val, err := strconv.Atoi(valStr); err == nil {
102 return val
103 }
104 return defaultVal
105}
106
107func GetEnvAsUUID(name string) (uuid.UUID, error) {
108 valStr := GetEnv(name, "")

Callers 1

LoadFunction · 0.85

Calls 1

GetEnvFunction · 0.85

Tested by

no test coverage detected