Better error message on missing envs

This commit is contained in:
Mike Schwörer 2022-11-26 17:03:26 +01:00
parent bf0ce5c963
commit 464cf3ec7e
Signed by: Mikescher
GPG Key ID: D3C7172E0A70F8CF
1 changed files with 2 additions and 1 deletions

View File

@ -185,7 +185,8 @@ func confEnv(key string) string {
if v, ok := os.LookupEnv(key); ok {
return v
} else {
panic(fmt.Sprintf("Missing required environment variable '%s'", key))
log.Fatal().Msg(fmt.Sprintf("Missing required environment variable '%s'", key))
return ""
}
}