Nanoid
A tiny and fast Go unique string generator
Install / Use
/learn @telesvar/NanoidREADME
Nano ID 
A tiny and fast Go unique string generator
- Safe. It uses cryptographically strong random APIs and tests distribution of symbols.
- Compact. It uses a larger alphabet than UUID
(A-Za-z0-9_-). So ID size was reduced from 36 to 21 symbols.
id, err := nanoid.New() //> "i25_rX9zwDdDn7Sg-ZoaH"
if err != nil {
log.Fatalln(err)
}
Installation
Once Go is installed, run the following command to get Nano ID.
go get github.com/aidarkhanov/nanoid/v2
Documentation
The package reference is located at pkg.go.dev/github.com/aidarkhanov/nanoid/v2.
Roadmap
- The API of this package is frozen.
- Release patches if necessary.
License
This package is provided under MIT/Expat license. See LICENSE.md file for details.
Thanks to
- Andrey Sitnik for the original JavaScript algorithm implementation.
- Paul Yuan for letting me improve the Python version of the library. Without the previous work, I would not be able to fully understand the algorithm.
Related Skills
node-connect
347.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
