From b44ee7fe246506c275aaf61ea29a0ede7eba54b3 Mon Sep 17 00:00:00 2001 From: John Deng Date: Tue, 27 Nov 2018 12:28:08 +0800 Subject: [PATCH] rename flag ForceOverride --- viper.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/viper.go b/viper.go index cf97ae846..0928375c7 100644 --- a/viper.go +++ b/viper.go @@ -167,7 +167,7 @@ func DecodeHook(hook mapstructure.DecodeHookFunc) DecoderConfigOption { // } type Viper struct { // Overwrite on merge - OverwriteOnMerge bool + ForceOverride bool // Delimiter that separates a list of keys // used to access a nested value in one go keyDelim string @@ -1269,7 +1269,7 @@ func (v *Viper) MergeConfig(in io.Reader) error { return err } v.mergeMaps(cfg, v.config, nil) - if v.OverwriteOnMerge { + if v.ForceOverride { v.override = v.config } return nil