We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have a two identical structs and I want to merge them.
type MyStruct struct { Field string } a := MyStruct{Field:"A"} b := MyStruct{Field:"B"} mergo.MergeWithOverwrite(&a, b)
panic: only structs and maps are supported
The text was updated successfully, but these errors were encountered:
I'm unable to reproduce this. It works as expected:
package main import ( "fmt" "github.com/imdario/mergo" ) type MyStruct struct { Field string } func main() { a := MyStruct{Field:"A"} b := MyStruct{Field:"B"} mergo.MergeWithOverwrite(&a, b) fmt.Printf("%v\n", a) }
Output:
dario@thinkpad /tmp $ go run test_mergo.go {B}
Sorry, something went wrong.
No branches or pull requests
I have a two identical structs and I want to merge them.
panic: only structs and maps are supported
The text was updated successfully, but these errors were encountered: