1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

fix: proper parsing of environment variables

This commit is contained in:
Ferdinand Mütsch
2020-04-26 13:55:19 +02:00
parent 7b486b390e
commit 91a4bb2db3
4 changed files with 22 additions and 15 deletions

14
utils/environment.go Normal file
View File

@ -0,0 +1,14 @@
package utils
import (
"log"
"os"
)
func LookupFatal(key string) string {
v, ok := os.LookupEnv(key)
if !ok {
log.Fatalf("missing env variable '%s'", key)
}
return v
}