diff --git a/ext/gofrs-uuid/uuid.go b/ext/gofrs-uuid/uuid.go index c1179ae2..a358fead 100644 --- a/ext/gofrs-uuid/uuid.go +++ b/ext/gofrs-uuid/uuid.go @@ -17,6 +17,11 @@ type UUID struct { } func (dst *UUID) Set(src interface{}) error { + if src == nil { + *dst = UUID{Status: pgtype.Null} + return nil + } + switch value := src.(type) { case uuid.UUID: *dst = UUID{UUID: value, Status: pgtype.Present}