Golang: An interface holding a nil value is not nil

Gary Lu
2 min readMay 21, 2019
  • Migrated to personal blog: link
  • Visit pacebits.com to check out recent projects I’m working on

Let’s start directly with an example (go playground):

package mainimport "fmt"func main() {    var a interface{}
fmt.Printf("a == nil is %t\n", a…

--

--

Gary Lu

Senior Software Development Engineer in AWS. Personal blog: https://glucn.com