goext 55
This commit is contained in:
parent
14bba38324
commit
3343285761
@ -16,9 +16,9 @@ type Config struct {
|
|||||||
LogLevel zerolog.Level `env:"SCN_LOGLEVEL"`
|
LogLevel zerolog.Level `env:"SCN_LOGLEVEL"`
|
||||||
ServerIP string `env:"SCN_IP"`
|
ServerIP string `env:"SCN_IP"`
|
||||||
ServerPort string `env:"SCN_PORT"`
|
ServerPort string `env:"SCN_PORT"`
|
||||||
DBMain DBConfig `envprefix:"SCN_DB_MAIN_"`
|
DBMain DBConfig `env:"SCN_DB_MAIN"`
|
||||||
DBRequests DBConfig `envprefix:"SCN_DB_REQUESTS_"`
|
DBRequests DBConfig `env:"SCN_DB_REQUESTS"`
|
||||||
DBLogs DBConfig `envprefix:"SCN_DB_LOGS_"`
|
DBLogs DBConfig `env:"SCN_DB_LOGS"`
|
||||||
RequestTimeout time.Duration `env:"SCN_REQUEST_TIMEOUT"`
|
RequestTimeout time.Duration `env:"SCN_REQUEST_TIMEOUT"`
|
||||||
RequestMaxRetry int `env:"SCN_REQUEST_MAXRETRY"`
|
RequestMaxRetry int `env:"SCN_REQUEST_MAXRETRY"`
|
||||||
RequestRetrySleep time.Duration `env:"SCN_REQUEST_RETRYSLEEP"`
|
RequestRetrySleep time.Duration `env:"SCN_REQUEST_RETRYSLEEP"`
|
||||||
@ -377,7 +377,7 @@ func GetConfig(ns string) (Config, bool) {
|
|||||||
}
|
}
|
||||||
if cfn, ok := allConfig[ns]; ok {
|
if cfn, ok := allConfig[ns]; ok {
|
||||||
c := cfn()
|
c := cfn()
|
||||||
err := confext.ApplyEnvOverrides(&c)
|
err := confext.ApplyEnvOverrides(&c, "_")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ require (
|
|||||||
github.com/jmoiron/sqlx v1.3.5
|
github.com/jmoiron/sqlx v1.3.5
|
||||||
github.com/mattn/go-sqlite3 v1.14.16
|
github.com/mattn/go-sqlite3 v1.14.16
|
||||||
github.com/rs/zerolog v1.28.0
|
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
|
gopkg.in/loremipsum.v1 v1.1.0
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -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.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 h1:WuhfxFVyywR7J4+hSTTW/wE87aFbGk7q22TGYusPg0s=
|
||||||
gogs.mikescher.com/BlackForestBytes/goext v0.0.50/go.mod h1:ZEXyKUr8t0EKdPN1FYdk0klY7N8OwXxipGE9lWgpVE8=
|
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.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 h1:UVQgzMY87xqpKNgb+kDsll2Igd33HszWHFLmpaRMq/8=
|
||||||
golang.org/x/crypto v0.4.0/go.mod h1:3quD/ATkf6oY+rnes5c3ExXTbLc8mueNue5/DoinL80=
|
golang.org/x/crypto v0.4.0/go.mod h1:3quD/ATkf6oY+rnes5c3ExXTbLc8mueNue5/DoinL80=
|
||||||
|
Loading…
Reference in New Issue
Block a user