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
That does not correspond to an operation permitted by the language. In the language, a value stored in an interface variable is not addressable. The interface variable is addressable, but not the value contained within. It's also inconsistent: your code permits changing the value if it is something like a string, but not if it is something like a pointer. We're not going to make this change.
What version of Go are you using (
go version
)?tip, go version devel +27eebba
What did you do?
I tried to change the value inside interface{} variable.
https://play.golang.org/p/U8WaCBA4o4
What did you expect to see?
"world" stored in i.
What did you see instead?
Runtime error.
Proposed change
The text was updated successfully, but these errors were encountered: