MCPcopy Create free account
hub / github.com/OpenFunction/samples / getEnvIntOrFail

Function getEnvIntOrFail

functions/async/pubsub/producer/producer.go:184–191  ·  view source on GitHub ↗
(key, fallbackValue string)

Source from the content-addressed store, hash-verified

182}
183
184func getEnvIntOrFail(key, fallbackValue string) int {
185 s := getEnvVar(key, fallbackValue)
186 v, err := strconv.Atoi(s)
187 if err != nil {
188 logger.Fatalf("invalid number variable: %s - %v", s, err)
189 }
190 return v
191}
192
193func getEnvDurationOrFail(key, fallbackValue string) time.Duration {
194 s := getEnvVar(key, fallbackValue)

Callers 1

producer.goFile · 0.85

Calls 1

getEnvVarFunction · 0.85

Tested by

no test coverage detected