rand

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package rand provides cryptographic random byte and integer utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandBetween

func RandBetween(minVal, maxVal int) (int, error)

RandBetween returns a uniform random int in [minVal, maxVal)

func RandInt

func RandInt() (int, error)

RandInt generates a random positive int value

func RandInt64

func RandInt64() (int64, error)

RandInt64 generates a random non-negative int64 in [0, math.MaxInt64]

func Shuffle

func Shuffle[T any](lst []T)

Shuffle shuffles a slice of any type

Types

This section is empty.

Jump to

Keyboard shortcuts

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