1 package mergo_test 2 3 import ( 4 "testing" 5 6 "github.com/imdario/mergo" 7 ) 8 9 type mapInterface map[string]interface{} 10 11 func TestMergeMapsEmptyString(t *testing.T) { 12 a := mapInterface{"s": ""} 13 b := mapInterface{"s": "foo"} 14 if err := mergo.Merge(&a, b); err != nil { 15 t.Error(err) 16 } 17 if a["s"] != "foo" { 18 t.Errorf("b not merged in properly: a.s.Value(%s) != expected(%s)", a["s"], "foo") 19 } 20 } 21