Skip to content
New issue

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

panic: reflect: call of reflect.Value.SetMapIndex on interface Value #89

Closed
bluexg7 opened this issue Mar 5, 2021 · 0 comments
Closed
Assignees

Comments

@bluexg7
Copy link

bluexg7 commented Mar 5, 2021

var m = make(map[string]string)
m["a"] = "ccc"

from := []interface{}{[]int{7,8,9},2,3, m, errors.New("aaaa")}
var to []interface{}

copier.CopyWithOption(&to, &from, copier.Option{
	IgnoreEmpty: false,
	DeepCopy:    true,
})

from[0].([]int)[0] = 10

fmt.Println(to)

this code will panic

@jinzhu jinzhu closed this as completed in d711dc7 Mar 9, 2021
tomtwinkle pushed a commit to tomtwinkle/copier that referenced this issue Mar 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants