UUID-format random strings for Go
open sourceMPL-2.0free
go-uuid is HashiCorp's Go library that generates UUID-format strings from high-quality, purely random bytes and parses UUID-format strings back into their bytes. It deliberately isn't RFC compliant: it just uses the familiar string form for a random 128-bit value.
Problems it solves
- generate a random ID in UUID format in Go
- parse a UUID string to bytes in Go
- random unique identifiers for a Go service
Features
- random 128-bit values in UUID string form
- parse UUID strings to bytes
Limitations
- Not RFC-compliant UUIDs: no versions or variants, only random bytes in UUID format.1
Alternatives
The same job
These do what go-uuid (HashiCorp) does.
- gofrs/uuid A pure Go package for creating and parsing UUIDs
- xid Short, sortable, globally unique IDs for Go with no configuration
