mirror of
https://github.com/spf13/viper
synced 2025-05-07 12:47:18 +00:00
ReadInConfig now clears override and other maps
This commit is contained in:
parent
f645e234c6
commit
64afcb0c57
1 changed files with 3 additions and 0 deletions
3
viper.go
3
viper.go
|
@ -1257,6 +1257,9 @@ func (v *Viper) ReadInConfig() error {
|
|||
}
|
||||
v.Lock()
|
||||
v.config = config
|
||||
v.override = make(map[string]interface{})
|
||||
v.kvstore = make(map[string]interface{})
|
||||
v.defaults = make(map[string]interface{})
|
||||
v.Unlock()
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue