Skip to content

Commit

Permalink
unexported OverwriteSliceWithEmptyValue config flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Vyacheslav.Vershinin authored and Vyacheslav.Vershinin committed Sep 24, 2019
1 parent d157f48 commit 3d62192
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type Config struct {
TypeCheck bool
Transformers Transformers
overwriteWithEmptyValue bool
OverwriteSliceWithEmptyValue bool
overwriteSliceWithEmptyValue bool
}

type Transformers interface {
Expand All @@ -45,7 +45,7 @@ func deepMerge(dst, src reflect.Value, visited map[uintptr]*visit, depth int, co
overwrite := config.Overwrite
typeCheck := config.TypeCheck
overwriteWithEmptySrc := config.overwriteWithEmptyValue
overwriteSliceWithEmptySrc := config.OverwriteSliceWithEmptyValue
overwriteSliceWithEmptySrc := config.overwriteSliceWithEmptyValue
config.overwriteWithEmptyValue = false

if !src.IsValid() {
Expand Down Expand Up @@ -248,7 +248,7 @@ func WithOverride(config *Config) {

// WithOverride will make merge override empty dst slice with empty src slice.
func WithOverrideEmptySlice(config *Config) {
config.OverwriteSliceWithEmptyValue = true
config.overwriteSliceWithEmptyValue = true
}

// WithAppendSlice will make merge append slices instead of overwriting it.
Expand Down

0 comments on commit 3d62192

Please sign in to comment.