Nano ID for Go
Added nanoid.Canonic()
which is direct to nanoid.Standard(21)
.
Made comments briefer, added a note in README about memory use.
License changed to GPL-3.0. Docs at https://pkg.go.dev/github.com/jaevor/go-nanoid.
go-nanoid v1.2.0
New function:
ASCII(length int)
for creating a Nano ID generator which uses an ASCII alphabet ranging 40-126 inclusive.Also, cleaner docs and exported the errInvalidLength
error.
go-nanoid v1.1.0
New functions:
CustomASCII(alphabet string, length int)
for creating a Nano ID generator which uses an ASCII alphabet.CustomUnicode(alphabet string, length int)
for creating a Nano ID generator which uses a unicode alphabet.
The difference between these two is that CustomASCII
uses way less memory and is faster than CustomUnicode
, so use whichever one makes sense.Custom
is now an alias to CustomUnicode
go-nanoid
v1.0.0
Standard(length int)
for generating Nano IDs ranging from 2-255
chars using the canonic A-Za-z-0-9_-
alphabet.Custom(alphabet string, length int)
for generating Nano IDs ranging from 2-255
chars using a custom alphabet.