identity-service/src/internal/app/config/env.go
Piotr Biernat dc58c80074
Some checks failed
continuous-integration/drone/push Build is failing
ci/cd test
2022-10-06 20:10:05 +02:00

23 lines
256 B
Go

package config
import (
"os"
"github.com/joho/godotenv"
)
var ErrLoadingEnvs error
func init() {
ErrLoadingEnvs = godotenv.Load()
}
func GetEnv(name, defVal string) string {
env := os.Getenv(name)
if env == "" {
return defVal
}
return env
}