Universally Unique Lexicographically Sortable Identifier (ULID)
An Odin implementation for ULID
import "ulid"
ulid, err := ulid.generate_ulid()
if err != .None {
// Handle Error
}
...
If you need a monotonic generation(in case two ulids might be generated in the same millisecond)
import "ulid"
ulid, err := ulid.generate_monotonic_ulid()
if err != .None {
// Handle Error
}
...
In case you need to decode an ulid string into its u128be value
import "ulid"
using ulid
ulid, _ := generate_ulid()
value, err := decode(ulid)
if err != .None {
// Handle Error
}
...