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
What gets passed to Func4 is different in both versions. If we add the statement fmt.Printf("%#v\n", values) this becomes apparent.
The first version produces []interface {}{[]interface {}{(*main.A2)(0xc000010060)}} (arbitrary pointer value) while the second version outputs &main.A2{Name:""}.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
output:
Should be a structure type, the result becomes an interface
What did you expect to see?
result is Struct
What did you see instead?
This way is the correct result
The text was updated successfully, but these errors were encountered: