Skip to content

LuizTrMr/odin-ulid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Universally Unique Lexicographically Sortable Identifier (ULID)

An Odin implementation for ULID

Please check the ULID Specification to learn more


Examples:

Basic usage

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
}
...

About

Odin implementation for ULIDs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages