aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/spf13/viper/viper.go
diff options
context:
space:
mode:
authorNiall Sheridan <nsheridan@gmail.com>2017-02-19 01:49:51 +0000
committerNiall Sheridan <nsheridan@gmail.com>2017-02-19 01:49:51 +0000
commiteb57eaf30965ba24ff669d6f9c8d11cd24951777 (patch)
treed04d1e425f0fce5c0f696b8cab7e660630cbd362 /vendor/github.com/spf13/viper/viper.go
parente8ff7ffe8e8c25195c64950b61c6c5754bbcd3ba (diff)
update dependencies
Diffstat (limited to 'vendor/github.com/spf13/viper/viper.go')
-rw-r--r--vendor/github.com/spf13/viper/viper.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/vendor/github.com/spf13/viper/viper.go b/vendor/github.com/spf13/viper/viper.go
index 2603c78..fce13b1 100644
--- a/vendor/github.com/spf13/viper/viper.go
+++ b/vendor/github.com/spf13/viper/viper.go
@@ -1093,9 +1093,15 @@ func (v *Viper) ReadInConfig() error {
return err
}
- v.config = make(map[string]interface{})
+ config := make(map[string]interface{})
+
+ err = v.unmarshalReader(bytes.NewReader(file), config)
+ if err != nil {
+ return err
+ }
- return v.unmarshalReader(bytes.NewReader(file), v.config)
+ v.config = config
+ return nil
}
// MergeInConfig merges a new configuration with an existing config.