Env returns the value of the named environment variable, falling back to defaultVal when unset or empty. Shared by every duckgres binary so the override semantics are identical.
(key, defaultVal string)
| 26 | // defaultVal when unset or empty. Shared by every duckgres binary so the |
| 27 | // override semantics are identical. |
| 28 | func Env(key, defaultVal string) string { |
| 29 | if v := os.Getenv(key); v != "" { |
| 30 | return v |
| 31 | } |
| 32 | return defaultVal |
| 33 | } |