Revert "Added a straight forward merge of the maps of configuration objects."

This reverts commit ea0dc3e3e0.
This commit is contained in:
Laszlo Kiss 2016-01-24 00:01:01 -07:00
parent ea0dc3e3e0
commit 0931e9e810

View file

@ -950,18 +950,6 @@ func (v *Viper) MergeConfig(in io.Reader) error {
return nil
}
// Merge a configuration into another.
func Merge( other *Viper ) { v.Merge( other ) }
func (v *Viper) Merge( other *Viper ) {
mergeMaps( other.config, v.config, nil )
mergeMaps( other.override, v.override, nil )
mergeMaps( other.defaults, v.defaults, nil )
mergeMaps( other.kvstore, v.kvstore, nil )
for key,val := range other.pflags { v.pflags[key] = val }
for key,val := range other.env { v.env[key] = val }
for key,val := range other.aliases { v.aliases[key] = val }
}
func keyExists(k string, m map[string]interface{}) string {
lk := strings.ToLower(k)
for mk := range m {