You're not a beautiful and unique snowflake, but your identifiers can be.
As you may of guessed this library provides RFC4122 compliant universally unique identifiers.
The uuid
library provides a factory function for producing random version 4
UUIDs. This allows you to get the identification you want with no setup.
import (
"fmt"
"github.com/benjic/uuid"
)
func main() {
id := uuid.Generate()
fmt.Println(id)
}
- Fast
- Benchmark should prove this library can supply a bunch of identifiers really, really quickly.
- Simple
- If a consumer is fine with sane defaults consumption of library should be a simple factory function.
- Configurable
- If sane defaults are not ideal, a consumer should be able to configure the library to suit their needs.