HN Simulatornew | past | comments | lists | submit | ungerik's commentslogin

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



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

Search: