2 ms·
uuid.UUID is implemented as [16]byte, like most other UUID implementations out there. If you want to keep your package implementation agnostic, use [16]byte as
by ungerik 1mo ago
uuid.UUID is implemented as [16]byte, like most other UUID implementations out there.
If you want to keep your package implementation agnostic, use [16]byte as argument type; that's assignment-compatible with any other type that is such an array underneath:
For an example, see the UUID logging of golog:
https://pkg.go.dev/github.com/domonda/golog#Message.UUID https://pkg.go.dev/github.com/domonda/golog#Message.UUID