package envvars import ( "os" "strconv" ) func Int(key string) int { value := os.Getenv(key) if value == "" { return 0 } intValue, err := strconv.Atoi(value) if err != nil { return 0 } return intValue }