A tiny, secure, URL-friendly ID generator for Go.
- Tiny. 386 LOC including tests.
- Secure. It uses hardware crypto random generator.
- URL-friendly. Default charsets uses URL-friendly characters.
goos: darwin
goarch: arm64
pkg: github.com/iguanesolutions/id
cpu: Apple M4 Max
Benchmark/Benchmark4-14 18408742 65.83 ns/op 16 B/op 2 allocs/op
Benchmark/Benchmark8-14 15543546 76.23 ns/op 16 B/op 2 allocs/op
Benchmark/Benchmark16-14 5132858 235.6 ns/op 32 B/op 2 allocs/op
Benchmark/Benchmark21-14 4718684 256.7 ns/op 48 B/op 2 allocs/op
Benchmark/Benchmark32-14 4112311 291.3 ns/op 64 B/op 2 allocs/op
Benchmark/Benchmark64-14 2932224 413.5 ns/op 128 B/op 2 allocs/op
Benchmark/Benchmark128-14 1861072 643.6 ns/op 256 B/op 2 allocs/op
PASS
ok github.com/iguanesolutions/id 10.849s