Skip to content

Commit

Permalink
allow bool to be mergable irrespective of value
Browse files Browse the repository at this point in the history
Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
  • Loading branch information
Pothulapati committed Jan 19, 2020
1 parent 0856b60 commit 5a1b1ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mergo.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func isEmptyValue(v reflect.Value) bool {
case reflect.Array, reflect.Map, reflect.Slice, reflect.String:
return v.Len() == 0
case reflect.Bool:
return !v.Bool()
return true
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
return v.Int() == 0
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
Expand Down

0 comments on commit 5a1b1ce

Please sign in to comment.