You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello 👋 I wrote the following test which fails (renamed from a Issue84 test with a similar problem)
func TestIssue84MergeMapWithNilValueToStructWithOverride(t *testing.T) {
p1 := map[string]interface{}{
"A": 0, "B": 1, "C": 2,
}
p2 := map[string]interface{}{
"D": nil,
}
if err := Map(&p1, p2, WithOverride); err != nil {
t.Fatalf("Error during the merge: %v", err)
}
if _, ok := p1["D"]; !ok {
t.Errorf("p1 should contain D: %+v", p1)
}
}
It prints:
p1 should contain D: map[A:0 B:1 C:2]
Would I be correct to expect p1 to contain map[A:0 B:1 C:2 D:nil] ?
If yes, I can have a go at fixing it - let me know if you want to reopen #84 (it seems to be a similar problem) or if I should create a new test file. Thanks!
The text was updated successfully, but these errors were encountered:
Hello 👋 I wrote the following test which fails (renamed from a Issue84 test with a similar problem)
It prints:
Would I be correct to expect p1 to contain map[A:0 B:1 C:2 D:nil] ?
If yes, I can have a go at fixing it - let me know if you want to reopen #84 (it seems to be a similar problem) or if I should create a new test file. Thanks!
The text was updated successfully, but these errors were encountered: