From 9e56dacc08fbbf8c9ee2dbc717553c758ce42bc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Tue, 12 Mar 2019 15:14:37 +0100 Subject: [PATCH] Remove superflous insensitiviseMaps in Unmarshal methods Fixes #482 --- viper.go | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/viper.go b/viper.go index cee37b216..7173c6e9a 100644 --- a/viper.go +++ b/viper.go @@ -811,8 +811,6 @@ func (v *Viper) UnmarshalKey(key string, rawVal interface{}, opts ...DecoderConf return err } - v.insensitiviseMaps() - return nil } @@ -828,8 +826,6 @@ func (v *Viper) Unmarshal(rawVal interface{}, opts ...DecoderConfigOption) error return err } - v.insensitiviseMaps() - return nil } @@ -872,8 +868,6 @@ func (v *Viper) UnmarshalExact(rawVal interface{}) error { return err } - v.insensitiviseMaps() - return nil } @@ -1579,13 +1573,6 @@ func (v *Viper) WatchRemoteConfigOnChannel() error { return v.watchKeyValueConfigOnChannel() } -func (v *Viper) insensitiviseMaps() { - insensitiviseMap(v.config) - insensitiviseMap(v.defaults) - insensitiviseMap(v.override) - insensitiviseMap(v.kvstore) -} - // Retrieve the first found remote configuration. func (v *Viper) getKeyValueConfig() error { if RemoteConfig == nil {