Open harrisonho99 opened 2 years ago
src := struct{ Name string }{Name: "harrison"} dst := make(map[string]interface{}) err := copier.CopyWithOption(&dst, src, copier.Option{DeepCopy: true}) if err != nil { // if copy didn't success, error should be returned panic(err) } fmt.Println(dst) // empty map
https://goplay.tools/snippet/ra4iaMjkHnl
Unsuccessful copy, expected error return
Description
https://goplay.tools/snippet/ra4iaMjkHnl