1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2024-11-29 08:22:11 +02:00
imgproxy/vendor/github.com/matoous/go-nanoid
2018-03-19 14:57:31 +06:00
..
examples Add request ID 2018-03-19 14:57:31 +06:00
.gitignore Add request ID 2018-03-19 14:57:31 +06:00
.travis.yml Add request ID 2018-03-19 14:57:31 +06:00
gonanoid_test.go Add request ID 2018-03-19 14:57:31 +06:00
gonanoid.go Add request ID 2018-03-19 14:57:31 +06:00
LICENSE Add request ID 2018-03-19 14:57:31 +06:00
README.md Add request ID 2018-03-19 14:57:31 +06:00

Go Nanoid

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()

Testing

$ go test -c -i -o /tmp/TestGenerate_in_gonanoid_test_gogo gonanoid

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.