Thoughts on Whatnot
A blog about .
Interfaces and nil in Go
The oddity that nil interfaces can be in Go is one that has caught a number of people off guard. After explaining it multiple times on Reddit and elsewhere, I figured it would be a good idea to have an article I can refer to. Since I’m attempting to start a little blog here, I thought this might make a good first article. The problem is pretty simple. It’s very possible to have what appears to be a nil interface in Go which is, in fact, not nil.
More...