go.uuid
go.uuid copied to clipboard
Can't scan into *uuid.UUID
Wondering if it's possible to support scanning into *uuid.UUID. Something like this:
type Team struct {
ID *uuid.UUID
}
// ...
var team Team
err := row.Scan(&team.ID)
Right now it'll error out with:
can't scan into dest[0]: Scan cannot decode into *uuid.UUID
If I use uuid.NullUUID it does work, but I prefer using pointers in this context.
Which version of Go is it? Curious because I can't find where this error is constructed in standard library sources.
@satori Go 1.8, and I'm using pgx, though I'm not sure that would make the difference.