getEnv returns "unknown" if environment variable is unset, the environment variable otherwise.
(name string)
| 165 | // getEnv returns "unknown" if environment variable is unset, the environment |
| 166 | // variable otherwise. |
| 167 | func getEnv(name string) string { |
| 168 | if val, ok := os.LookupEnv(name); ok { |
| 169 | return val |
| 170 | } |
| 171 | return "unknown" |
| 172 | } |
| 173 | |
| 174 | var ( |
| 175 | // This function will be overridden in unit tests. |
no outgoing calls
no test coverage detected