TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Multiple nil types in Go.

7 pointsby eonilover 11 years ago

2 comments

_akover 11 years ago
But: <a href="http://play.golang.org/p/J46-8OEWYS" rel="nofollow">http:&#x2F;&#x2F;play.golang.org&#x2F;p&#x2F;J46-8OEWYS</a>
评论 #7017266 未加载
评论 #7016104 未加载
LocalManover 11 years ago
In Go, nil is a value, not a type. Assigning &#x27;nil&#x27; to an interface only assigns the value, not the type. An interface has both a value and a type at runtime, but is &quot;nil&quot; only if both the value and the type are nil.
评论 #7018069 未加载