ulid

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package ulid provides a hand-rolled ULID generator. ULIDs are 128-bit identifiers: 48-bit millisecond timestamp + 80-bit random component, encoded as 26-character Crockford Base32 strings. Within the same millisecond, a monotonic counter ensures lexicographic ordering. Thread-safe.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() string

New generates a new ULID. Thread-safe. Format: 10 Crockford chars for 48-bit timestamp, 16 chars for 80-bit random.

func Parse

func Parse(s string) (string, error)

Parse validates that s is a valid ULID (26 uppercase Crockford Base32 chars). Returns the string unchanged if valid, or an error.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL