From 54e585af54185064cfed336e8be399ba2de11304 Mon Sep 17 00:00:00 2001 From: Kiril Zvezdarov Date: Sun, 26 Apr 2015 15:08:10 -0400 Subject: [PATCH] Clean config register before reading in from file in order to avoid stale values --- viper.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/viper.go b/viper.go index b23d837..e099839 100644 --- a/viper.go +++ b/viper.go @@ -677,6 +677,8 @@ func (v *Viper) ReadInConfig() error { return err } + v.config = make(map[string]interface{}) + v.marshalReader(bytes.NewReader(file), v.config) return nil }