type MyModel struct {
Age int64
Name string
}
obj1 := MyModel{
Age: 10,
Name: "Go",
}
obj2 := MyModel{
Name: "Python",
}
I want to create (or just update any one of the object) and keep the values from obj2 (for key which are present in it) and take the defaults from obj1.
So the result should be like:
{
Age: 10.
Name: "Python"
}
I can have multiple keys to update and take defaults of.