From c66462282ec14aea96b961012098f83e5a0f873d Mon Sep 17 00:00:00 2001 From: Neven Miculinic Date: Tue, 6 Nov 2018 12:05:02 +0100 Subject: [PATCH] Added opts to DecoderConfigOption --- viper.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/viper.go b/viper.go index a32ab73..33d322e 100644 --- a/viper.go +++ b/viper.go @@ -851,8 +851,8 @@ func decode(input interface{}, config *mapstructure.DecoderConfig) error { // UnmarshalExact unmarshals the config into a Struct, erroring if a field is nonexistent // in the destination struct. -func (v *Viper) UnmarshalExact(rawVal interface{}) error { - config := defaultDecoderConfig(rawVal) +func (v *Viper) UnmarshalExact(rawVal interface{}, opts ...DecoderConfigOption) error { + config := defaultDecoderConfig(rawVal, opts...) config.ErrorUnused = true err := decode(v.AllSettings(), config)