github.com/aidarkhanov/nanoid

nanoid

Package nanoid provides fast and convenient unique string generator.

62

Decision Signals

Health score 62/100, confidence 100/100.

Review
Maintenance 12
Adoption 72
Security 92
Maturity 94
Developer DX 83
Confidence 100

Install

go get github.com/aidarkhanov/nanoid

Package Data

updated Jun 11, 2026
Latest versionv1.0.8
Imported by39 packages
Stars62
Forks8
Last activity3 years ago
Latest releaseUnknown
LicenseMIT
Known vuln records0

API Surface

9 symbols
SymbolKindSynopsis
BytesGenerator Type type BytesGenerator func(step int) ([]byte, error)
DefaultAlphabet Constant const DefaultAlphabet
DefaultSize Constant const DefaultSize
Format Function func Format(generateRandomBuffer BytesGenerator, alphabet string, size int) (string, error)
Generate Function func Generate(alphabet string, size int) (string, error)
Must Function func Must(id string, err error) string
MustFormat Function func MustFormat(generateRandomBuffer BytesGenerator, alphabet string, size int) string
MustGenerate Function func MustGenerate(alphabet string, size int) string
New Function func New() string

Maintained Alternatives

archived repository

#1 uuid

A UUID package for Go

Go UUID Libraries 1.8K stars 0 imported-by 45% confidence
79

#2 Google UUID

Package uuid generates and inspects UUIDs.

Go UUID Libraries 6.1K stars 113.5K imported-by 100% confidence
78

#3 go.uuid

Package uuid provides implementation of Universally Unique Identifier (UUID).

Go UUID Libraries 4.9K stars 0 imported-by 60% confidence
68

#4 ksuid

K-Sortable Globally Unique IDs

Go UUID Libraries 5.3K stars 0 imported-by 60% confidence
63

#5 violetear

Package violetear - HTTP router Basic example: package main import ( "fmt" "github.com/nbari/violetear" "log" "net/http" ) func catchAll(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, r.URL.Path[1:]) } func helloWorld(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, r.URL.Path[1:]) } func handleUUID(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, r.URL.Path[1:]) } func main() { router := violetear.New() router.LogRequests = true router.RequestID = "REQUEST_LOG_ID" router.AddRegex(":uuid", `[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}`) router.HandleFunc("*", catchAll) router.HandleFunc("/hello", helloWorld, "GET,HEAD") router.HandleFunc("/root/:uuid/item", handleUUID, "POST,PUT") srv := &http.Server{ Addr: ":8080", Handler: router, ReadTimeout: 5 * time.Second, WriteTimeout: 7 * time.Second, MaxHeaderBytes: 1 << 20, } log.Fatal(srv.ListenAndServe()) }

Go UUID Libraries 0 stars 87 imported-by 45% confidence
58

Similar Packages

Go UUID Libraries

#1 uuid

A UUID package for Go

Go UUID Libraries 1.8K stars 0 imported-by 45% confidence
79

#2 Google UUID

Package uuid generates and inspects UUIDs.

Go UUID Libraries 6.1K stars 113.5K imported-by 100% confidence
78

#3 go.uuid

Package uuid provides implementation of Universally Unique Identifier (UUID).

Go UUID Libraries 4.9K stars 0 imported-by 60% confidence
68

#4 ksuid

K-Sortable Globally Unique IDs

Go UUID Libraries 5.3K stars 0 imported-by 60% confidence
63

#5 violetear

Package violetear - HTTP router Basic example: package main import ( "fmt" "github.com/nbari/violetear" "log" "net/http" ) func catchAll(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, r.URL.Path[1:]) } func helloWorld(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, r.URL.Path[1:]) } func handleUUID(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, r.URL.Path[1:]) } func main() { router := violetear.New() router.LogRequests = true router.RequestID = "REQUEST_LOG_ID" router.AddRegex(":uuid", `[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}`) router.HandleFunc("*", catchAll) router.HandleFunc("/hello", helloWorld, "GET,HEAD") router.HandleFunc("/root/:uuid/item", handleUUID, "POST,PUT") srv := &http.Server{ Addr: ":8080", Handler: router, ReadTimeout: 5 * time.Second, WriteTimeout: 7 * time.Second, MaxHeaderBytes: 1 << 20, } log.Fatal(srv.ListenAndServe()) }

Go UUID Libraries 0 stars 87 imported-by 45% confidence
58