randx

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package randx extends crypto/rand with the id shapes daemons actually mint: short random hex strings for correlation/resource ids where a full UUID is more ceremony than needed.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hex

func Hex(n int) string

Hex returns n random bytes as a 2n-character lowercase hex string. Like uuid.V4, entropy failure degrades to a clock-derived id instead of panicking — these are resource ids, where a collision is a nuisance and a crash is not an acceptable trade. n <= 0 returns "".

Types

This section is empty.

Jump to

Keyboard shortcuts

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