GetEnv gets an environment variable. If not defined, it gets the fallback.
(lookup string, fallback string)
| 24 | // GetEnv gets an environment variable. |
| 25 | // If not defined, it gets the fallback. |
| 26 | func GetEnv(lookup string, fallback string) string { |
| 27 | if res, ok := os.LookupEnv(lookup); ok { |
| 28 | return res |
| 29 | } |
| 30 | return fallback |
| 31 | } |
| 32 | |
| 33 | // IsWindows checks if OS is Windows |
| 34 | func IsWindows() bool { |