Here's a four-line replacement for the various `sql.Null*` types in the standard library.
type Null(type T) struct {
Val T
Valid bool // Valid is true if Val is not NULL
}
Here's what it looks like in practice: https://go2goplay.golang.org/p/Qj8MqYWWAc3