ReadInConfig now clears override and other maps

This commit is contained in:
Andrey Odintsov 2019-03-01 16:28:51 +03:00
parent f645e234c6
commit 64afcb0c57

View file

@ -1257,6 +1257,9 @@ func (v *Viper) ReadInConfig() error {
} }
v.Lock() v.Lock()
v.config = config v.config = config
v.override = make(map[string]interface{})
v.kvstore = make(map[string]interface{})
v.defaults = make(map[string]interface{})
v.Unlock() v.Unlock()
return nil return nil
} }