From 464cf3ec7e8b28dd5331054afc9fa839896be45b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Schw=C3=B6rer?= Date: Sat, 26 Nov 2022 17:03:26 +0100 Subject: [PATCH] Better error message on missing envs --- server/config.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/config.go b/server/config.go index 9fcdfa3..502dc2b 100644 --- a/server/config.go +++ b/server/config.go @@ -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 "" } }