If a database column is nullable, one of the types supporting null values should
be passed to Scan.
For example, if the name column in the names table is nullable:
var name NullString
err := db.QueryRow(
"SELECT name FROM names WHERE id = ?", id).Scan(&name)
...
if name.Valid {
// use name.String
} else {
// value is NULL
}
There is nothing in here that should be considered a cautionary tale for someone choosing to go with Golang. If they couldn't fix a race condition then that is too bad. However I do agree that there are too many projects not just in Go but in many other languages where the original authors have sort of abandoned their project or there aren't too many contributors to support for example hypergo which is a client library for Hyperdex.
From https://code.google.com/p/go-wiki/wiki/SQLInterface