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
I don't seem to find out why the tests pass in stuff like complexTest but fails to merge correctly stuff like the following:
package main
import (
"fmt"
"github.com/imdario/mergo"
)
type Person struct {
ID int
Name string
Address string
}
var defaultPerson = Person{
ID: 1,
Name: "Homer",
Address: "742 Evergreen Terrace",
}
func main() {
a := Person{Name: `John`}
if err := mergo.Merge(&a, defaultPerson); err != nil {
fmt.Printf("ERR: %+v", err)
}
fmt.Printf("A is: %+v\n", a)
// Prints A is: {ID:1 Name:Homer Address:742 Evergreen Terrace}
// should print A is: {ID:1 Name:John Address:742 Evergreen Terrace}
}
The text was updated successfully, but these errors were encountered:
I don't seem to find out why the tests pass in stuff like
complexTest
but fails to merge correctly stuff like the following:The text was updated successfully, but these errors were encountered: