Skip to content

Commit

Permalink
rename flag ForceOverride
Browse files Browse the repository at this point in the history
  • Loading branch information
john-deng committed Nov 27, 2018
1 parent 5356858 commit b44ee7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions viper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b44ee7f

Please # to comment.