diff --git a/scnserver/config.go b/scnserver/config.go index aa18c47..2fd30af 100644 --- a/scnserver/config.go +++ b/scnserver/config.go @@ -16,9 +16,9 @@ type Config struct { LogLevel zerolog.Level `env:"SCN_LOGLEVEL"` ServerIP string `env:"SCN_IP"` ServerPort string `env:"SCN_PORT"` - DBMain DBConfig `envprefix:"SCN_DB_MAIN_"` - DBRequests DBConfig `envprefix:"SCN_DB_REQUESTS_"` - DBLogs DBConfig `envprefix:"SCN_DB_LOGS_"` + DBMain DBConfig `env:"SCN_DB_MAIN"` + DBRequests DBConfig `env:"SCN_DB_REQUESTS"` + DBLogs DBConfig `env:"SCN_DB_LOGS"` RequestTimeout time.Duration `env:"SCN_REQUEST_TIMEOUT"` RequestMaxRetry int `env:"SCN_REQUEST_MAXRETRY"` RequestRetrySleep time.Duration `env:"SCN_REQUEST_RETRYSLEEP"` @@ -377,7 +377,7 @@ func GetConfig(ns string) (Config, bool) { } if cfn, ok := allConfig[ns]; ok { c := cfn() - err := confext.ApplyEnvOverrides(&c) + err := confext.ApplyEnvOverrides(&c, "_") if err != nil { panic(err) } diff --git a/scnserver/go.mod b/scnserver/go.mod index 7cfcaa3..d22b615 100644 --- a/scnserver/go.mod +++ b/scnserver/go.mod @@ -7,7 +7,7 @@ require ( github.com/jmoiron/sqlx v1.3.5 github.com/mattn/go-sqlite3 v1.14.16 github.com/rs/zerolog v1.28.0 - gogs.mikescher.com/BlackForestBytes/goext v0.0.50 + gogs.mikescher.com/BlackForestBytes/goext v0.0.55 gopkg.in/loremipsum.v1 v1.1.0 ) diff --git a/scnserver/go.sum b/scnserver/go.sum index 9efe9e9..3b12cf7 100644 --- a/scnserver/go.sum +++ b/scnserver/go.sum @@ -77,6 +77,8 @@ gogs.mikescher.com/BlackForestBytes/goext v0.0.49 h1:Ro62ZyJW22elAJKT0XlY94LzAv0 gogs.mikescher.com/BlackForestBytes/goext v0.0.49/go.mod h1:ZEXyKUr8t0EKdPN1FYdk0klY7N8OwXxipGE9lWgpVE8= gogs.mikescher.com/BlackForestBytes/goext v0.0.50 h1:WuhfxFVyywR7J4+hSTTW/wE87aFbGk7q22TGYusPg0s= gogs.mikescher.com/BlackForestBytes/goext v0.0.50/go.mod h1:ZEXyKUr8t0EKdPN1FYdk0klY7N8OwXxipGE9lWgpVE8= +gogs.mikescher.com/BlackForestBytes/goext v0.0.55 h1:mzX/s+EBhnaRbiz3+6iwDJyJFS0F+jkbssiLDr9eJYY= +gogs.mikescher.com/BlackForestBytes/goext v0.0.55/go.mod h1:ZEXyKUr8t0EKdPN1FYdk0klY7N8OwXxipGE9lWgpVE8= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.4.0 h1:UVQgzMY87xqpKNgb+kDsll2Igd33HszWHFLmpaRMq/8= golang.org/x/crypto v0.4.0/go.mod h1:3quD/ATkf6oY+rnes5c3ExXTbLc8mueNue5/DoinL80=