Hacker News new | past | comments | ask | show | jobs | submit login

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 provides a UUID type with that behavior.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: