generated from pkg/go-template
feat: pkg
This commit is contained in:
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
package env
|
||||
|
||||
import "os"
|
||||
|
||||
func GetEnvDefault(key, defVal string) string {
|
||||
val, ex := os.LookupEnv(key)
|
||||
if !ex {
|
||||
os.Setenv(key, defVal)
|
||||
return defVal
|
||||
}
|
||||
return val
|
||||
}
|
||||
Reference in New Issue
Block a user