moved from yaml to env config

alpha
alex 2023-02-18 14:57:43 +01:00
parent 5ba59c0d22
commit 98d1d26394
1 changed files with 5 additions and 0 deletions

View File

@ -5,6 +5,7 @@ import (
"strconv"
gocnjhelper "git.clickandjoin.umbach.dev/ClickandJoin/go-cnj-helper"
"github.com/joho/godotenv"
)
var Cfg Config
@ -39,6 +40,10 @@ type Templates struct {
}
func LoadConfig() {
if err := godotenv.Load("local.env"); err != nil {
gocnjhelper.LogFatalf("Failed to load env, err: %s", err)
}
debug, err := strconv.ParseBool(os.Getenv("DEBUG"))
if err != nil {