gouid package - github.com/twharmon/gouid - Go Packages
Package guoid provides cryptographically secure unique identifiers of type string and type []byte.
On Linux, FreeBSD, Dragonfly and Solaris, getrandom(2) is used if available, /dev/urandom otherwise. On OpenBSD and macOS, getentropy(2) is used. On other Unix-like systems, /dev/urandom is used. On Windows systems, the RtlGenRandom API is used. On Wasm, the Web Crypto API is used.
This section is empty.
var ( Secure32Char = []byte("abcdefghijklmnopqrstuvwxyz012345") Secure64Char = []byte("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-") )
Charsets for string gouids.
String returns a string with the given size made up of characters from the given charset. Ids are made with cryptographically secure random bytes. The length of charset must not exceed 256.