(key string, fallback int)
| 18 | } |
| 19 | |
| 20 | func GetInt(key string, fallback int) int { |
| 21 | val, ok := os.LookupEnv(key) |
| 22 | if !ok { |
| 23 | return fallback |
| 24 | } |
| 25 | |
| 26 | valAsInt, err := strconv.Atoi(val) |
| 27 | if err != nil { |
| 28 | return fallback |
| 29 | } |
| 30 | |
| 31 | return valAsInt |
| 32 | } |
| 33 | |
| 34 | func GetBool(key string, fallback bool) bool { |
| 35 | val, ok := os.LookupEnv(key) |
nothing calls this directly
no outgoing calls
no test coverage detected