Closed infastin closed 4 months ago
So this will work when the type is a primitive?
LGTM, though.
So this will work when the type is a primitive?
Should work with any type that msgp can work with.
Please add a suite of tests.
Added some tests.
You can bump CI to 1.21 and 1.22 if that help.
Sorry, didn't notice it was go1.18, should be fine now.
Thanks! Giving it a bit of time to see if there are any objects before merge.
@infastin Seems we've picked up a conflict. Could you resolve that, and I'll merge ASAP.
@klauspost Resolved.
Adds a
replace
directive that makes it easier to serialize foreign types.Example usage with github.com/google/uuid
```go package main import "github.com/google/uuid" //go:generate msgp //msgp:replace uuid.UUID with:UUID type UUID [16]byte // Or like that //msgp:replace uuid.UUID with:[16]byte type User struct { ID uuid.UUID } ```Also adds
any
to the list of primitives.