Skip to content

Commit

Permalink
Remove 'viper' tag customizer for UnmarshalViper
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Xie committed Feb 9, 2020
1 parent c689310 commit fea89f4
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions configutil/viper.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,7 @@ func UnmarshalViper(
ptr zero.Interface,
opts ...viper.DecoderConfigOption,
) error {
opts = append(
[]viper.DecoderConfigOption{
mapstructx.WithDecodeHook(mapstructx.UnmarshalerHookFunc()),
mapstructx.WithTagName("viper"),
},
opts...,
)
withHook := mapstructx.WithDecodeHook(mapstructx.UnmarshalerHookFunc())
opts = append([]viper.DecoderConfigOption{withHook}, opts...)
return v.Unmarshal(ptr, opts...)
}

0 comments on commit fea89f4

Please sign in to comment.