From 5a1b1cee7b3f9022825154dea4dcf5fb0dceecb8 Mon Sep 17 00:00:00 2001 From: Tarun Pothulapati Date: Sun, 19 Jan 2020 19:34:48 +0530 Subject: [PATCH] allow bool to be mergable irrespective of value Signed-off-by: Tarun Pothulapati --- mergo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mergo.go b/mergo.go index a82fea2..e59cd29 100644 --- a/mergo.go +++ b/mergo.go @@ -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: