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
The problem is not that reflect.Kind returned the wrong value. The problem is that fmt.Println did not invoke the String method of reflect.Kind. The value of Int is in fact 2.
Are you sure that you ran the exact program you show on MacOS? For example, you did not change fmt.Println to simply println?
What version of Go are you using (
go version
)?go version go1.8.1 darwin/amd64
What operating system and processor architecture are you using (
go env
)?macOS Sierra
What did you do?
What did you expect to see?
play.golang.org has the right output:
X int
What did you see instead?
my result:
X 2
The text was updated successfully, but these errors were encountered: