rand

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Rand

type Rand struct {
	*rand.Rand
}

Test helper for generating random test values.

func New

func New(seed int64) Rand

Create a new rand object from a seed. A static seed should be used to ensure deterministic tests.

func (Rand) ASCII

func (r Rand) ASCII(len int) string

Generate a random ASCII string of printable characters.

func (Rand) Bytes

func (r Rand) Bytes(len int) []byte

Generate a random sequence of bytes.

func (Rand) IntRange

func (r Rand) IntRange(min, max int) int

Generate a random int between [min, max] inclusive.

Jump to

Keyboard shortcuts

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