You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
242 B
Go
13 lines
242 B
Go
7 months ago
|
package common
|
||
7 months ago
|
|
||
|
import "os"
|
||
|
|
||
|
func GetDefaultEnv(key, default_value string) string {
|
||
|
// TODO figure out how to write unit test for this How would you wring
|
||
|
value := os.Getenv(key)
|
||
|
if value == "" {
|
||
|
value = default_value
|
||
|
}
|
||
|
return value
|
||
|
}
|