mirror of
https://github.com/scroll-tech/scroll.git
synced 2026-01-14 00:18:03 -05:00
13 lines
229 B
Go
13 lines
229 B
Go
package utils
|
|
|
|
import "os"
|
|
|
|
// GetEnvWithDefault get value from env if is none use the default
|
|
func GetEnvWithDefault(key string, defult string) string {
|
|
val := os.Getenv(key)
|
|
if len(val) == 0 {
|
|
val = defult
|
|
}
|
|
return val
|
|
}
|