mirror of
https://github.com/spf13/viper
synced 2024-12-22 19:47:01 +00:00
Revert "Added a straight forward merge of the maps of configuration objects."
This reverts commit ea0dc3e3e0
.
This commit is contained in:
parent
ea0dc3e3e0
commit
0931e9e810
1 changed files with 0 additions and 12 deletions
12
viper.go
12
viper.go
|
@ -950,18 +950,6 @@ func (v *Viper) MergeConfig(in io.Reader) error {
|
||||||
return nil
|
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 {
|
func keyExists(k string, m map[string]interface{}) string {
|
||||||
lk := strings.ToLower(k)
|
lk := strings.ToLower(k)
|
||||||
for mk := range m {
|
for mk := range m {
|
||||||
|
|
Loading…
Reference in a new issue