From 64afcb0c57e393778e59d073c38edb8a38ff2930 Mon Sep 17 00:00:00 2001 From: Andrey Odintsov Date: Fri, 1 Mar 2019 16:28:51 +0300 Subject: [PATCH] ReadInConfig now clears override and other maps --- viper.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/viper.go b/viper.go index 8f04012..916c190 100644 --- a/viper.go +++ b/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 }