idgen

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(prefix string) string

func New

func New(prefix string) func() string

New generates a new ULID with the given prefix. Format: {prefix}_{ulid_lower_case}

func Token

func Token(length int) (string, error)

Token generates a cryptographically secure random token of the specified length (in bytes). It returns the hex-encoded string representation of the token.

Types

This section is empty.

Jump to

Keyboard shortcuts

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