feat: use env variable in yaml config files

This commit is contained in:
Michael Barz
2024-02-09 17:41:59 +01:00
parent 5e94c7281d
commit 00e43b8274
2 changed files with 16 additions and 0 deletions
+1
View File
@@ -20,6 +20,7 @@ var (
func BindSourcesToStructs(service string, dst interface{}) (*gofig.Config, error) {
cnf := gofig.NewWithOptions(service)
cnf.WithOptions(func(options *gofig.Options) {
options.ParseEnv = true
options.DecoderConfig.TagName = decoderConfigTagName
})
cnf.AddDriver(gooyaml.Driver)