Skip to content

Commit

Permalink
ignore bindEnvs when type is map
Browse files Browse the repository at this point in the history
  • Loading branch information
Teddy Budiono Hermawan committed Aug 8, 2023
1 parent 59dd7a1 commit e0af2d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/viper/viper.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func Load(confPath string, receiver interface{}) {

// viper supports unmarshaling from env vars if the keys are known
//
// bindEnvs is a hack to let viper know in advance what keys exists
// bindEnvs is a hack to let viper know in advance what keys exists, even if it doesn't exist in config.yml
func bindEnvs(v reflect.Value, parts ...string) {
if v.Kind() == reflect.Ptr {
if v.IsNil() {
Expand Down

0 comments on commit e0af2d5

Please sign in to comment.