MCPcopy Index your code
hub / github.com/matoous/go-nanoid

github.com/matoous/go-nanoid @v2.1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.1.0 ↗ · + Follow
11 symbols 26 edges 4 files 6 documented · 55% 23 cross-repo links

Browse by type

Functions 11 Types & classes 0
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Go Nanoid

CI GoDoc Go Report Card GitHub issues License

This package is Go implementation of ai's nanoid!

Safe. It uses cryptographically strong random generator.

Compact. It uses more symbols than UUID (A-Za-z0-9_-) and has the same number of unique options in just 22 symbols instead of 36.

Fast. Nanoid is as fast as UUID but can be used in URLs.

There's also this alternative: https://github.com/jaevor/go-nanoid.

Install

Via go get tool

$ go get github.com/matoous/go-nanoid/v2

Usage

Generate ID

id, err := gonanoid.New()

Generate ID with a custom alphabet and length

id, err := gonanoid.Generate("abcde", 54)

Notice

If you use Go Nanoid in your project, please let me know!

If you have any issues, just feel free and open it in this repository, thanks!

Credits

License

The MIT License (MIT). Please see License File for more information.

Core symbols most depended-on inside this repo

Shape

Function 11

Languages

Go100%

Modules by API surface

gonanoid.go5 symbols
gonanoid_internal_test.go3 symbols
gonanoid_test.go2 symbols
examples/simple_example.go1 symbols

For agents

$ claude mcp add go-nanoid \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page