TE
TechEcho
Home
24h Top
Newest
Best
Ask
Show
Jobs
English
GitHub
Twitter
Home
Multiple nil types in Go.
7 points
by
eonil
over 11 years ago
2 comments
_ak
over 11 years ago
Collapse
But: <a href="http://play.golang.org/p/J46-8OEWYS" rel="nofollow">http://play.golang.org/p/J46-8OEWYS</a>
评论 #7017266 未加载
评论 #7016104 未加载
LocalMan
over 11 years ago
Collapse
In Go, nil is a value, not a type. Assigning 'nil' to an interface only assigns the value, not the type. An interface has both a value and a type at runtime, but is "nil" only if both the value and the type are nil.
评论 #7018069 未加载