package nuid
Import Path
github.com/nats-io/nuid (on go.dev)
Dependency Relation
imports 7 packages, and imported by one package
Involved Source Files
A unique identifier generator that is high performance, very fast, and tries to be entropy pool friendly.
Package-Level Type Names (only one)
Generate the next NUID string.
Generate a new prefix from crypto/rand.
This call *can* drain entropy and will be called automatically when we exhaust the sequential range.
Will panic if it gets an error from rand.Int()
func New() *NUID
Package-Level Functions (total 2)
New will generate a new NUID and properly initialize the prefix, sequential start, and sequential increment.
Generate the next NUID string from the global locked NUID instance.
Package-Level Constants (only one)
Version of the library
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |