MCPcopy Index your code
hub / github.com/NdoleStudio/httpsms / getEnvWithDefault

Function getEnvWithDefault

api/pkg/di/config.go:19–26  ·  view source on GitHub ↗
(key, defaultValue string)

Source from the content-addressed store, hash-verified

17}
18
19func getEnvWithDefault(key, defaultValue string) string {
20 value := os.Getenv(key)
21 if value == "" {
22 return defaultValue
23 }
24
25 return value
26}
27
28func splitCommaEnv(key, defaultValue string) []string {
29 value := getEnvWithDefault(key, defaultValue)

Callers 1

splitCommaEnvFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected