3 ms·
You can use a type that marshals the Go zero value to database null and vice versa. https://godoc.org/github.com/jackc/pgtype/zeronull https://godoc.org/github.
by uncanny 7y ago
You can use a type that marshals the Go zero value to database null and vice versa. https://godoc.org/github.com/jackc/pgtype/zeronull https://godoc.org/github.com/jackc/pgtype/zeronull provides a UUID type with that behavior.