Ways to handle SQL NULL values in Go
If you have dealt with SQL in Golang, you know that handling NULL values didn’t come easily with it. The database/sql interface already support NULL values by usage of Go’s nil, but the design of the language doesn’t permit to assign nil to a string or int variable. In this post, I will show you the ways. 1) Pointers In Go, if the primitive variable isn’t a pointer, you can’t assign nil....