We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a965813 commit 7d0d111Copy full SHA for 7d0d111
main.go
@@ -456,3 +456,15 @@ func getBoolEnv(envName string) bool {
456
}
457
return boolVar
458
459
+
460
+func getIntEnv(envName string) int {
461
+ var intVar int
462
+ if initStr, ok := os.LookupEnv(envName); ok {
463
+ var err error
464
+ if intVar, err = strconv.Atoi(initStr); err != nil {
465
+ log.Error(err, fmt.Sprintf("unable to parse provided '%s'", envName))
466
+ os.Exit(1)
467
+ }
468
469
+ return intVar
470
+}
0 commit comments