go-nanoid

Go implementation of ai's nanoid

Go Nanoid

Build Status
Build Status
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.

Install

Via go get tool

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

Usage

Generate ID

id, err := gonanoid.Nanoid()

Generate ID with custom alphabet and length

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

Testing

$ go test

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.

主要指標

概覽
名稱與所有者foo123/FILTER.js
主編程語言JavaScript
編程語言Go (語言數: 4)
平台
許可證
所有者活动
創建於2011-12-23 21:04:16
推送於2025-04-30 15:43:25
最后一次提交2025-04-30 18:43:22
發布數33
最新版本名稱1.13.0 (發布於 )
第一版名稱0.1 (發布於 )
用户参与
星數400
關注者數19
派生數47
提交數505
已啟用問題?
問題數12
打開的問題數1
拉請求數2
打開的拉請求數0
關閉的拉請求數0
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?