MCPcopy Create free account
hub / github.com/codealong-dev/ride-sharing / GetBool

Function GetBool

shared/env/env.go:34–46  ·  view source on GitHub ↗
(key string, fallback bool)

Source from the content-addressed store, hash-verified

32}
33
34func GetBool(key string, fallback bool) bool {
35 val, ok := os.LookupEnv(key)
36 if !ok {
37 return fallback
38 }
39
40 boolVal, err := strconv.ParseBool(val)
41 if err != nil {
42 return fallback
43 }
44
45 return boolVal
46}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected