Files
Orchestra/config/env.go
T
2026-05-08 14:05:53 +00:00

22 lines
300 B
Go

package config
import (
"os"
"strconv"
)
func GetStrFromEnv(k string, d string) string {
if os.Getenv(k) != "" {
return os.Getenv(k)
}
return d
}
func GetBoolFromEnv(k string, d bool) bool {
if os.Getenv(k) != "" {
bool, _ := strconv.ParseBool(os.Getenv(k))
return bool
}
return d
}