GetTaskEnvBool returns the boolean value of a TASK_ prefixed env var. Returns the value and true if set and valid, or false and false if not set or invalid.
(key string)
| 67 | // GetTaskEnvBool returns the boolean value of a TASK_ prefixed env var. |
| 68 | // Returns the value and true if set and valid, or false and false if not set or invalid. |
| 69 | func GetTaskEnvBool(key string) (bool, bool) { |
| 70 | v := GetTaskEnv(key) |
| 71 | if v == "" { |
| 72 | return false, false |
| 73 | } |
| 74 | b, err := strconv.ParseBool(v) |
| 75 | return b, err == nil |
| 76 | } |
| 77 | |
| 78 | // GetTaskEnvInt returns the integer value of a TASK_ prefixed env var. |
| 79 | // Returns the value and true if set and valid, or 0 and false if not set or invalid. |
no test coverage detected
searching dependent graphs…