rand

package
v1.20.3 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IntBetween

func IntBetween(r *rand.Rand, minVal, maxVal int) int

IntBetween generates a random number between min and max inclusive.

func SelectAccounts

func SelectAccounts(r *rand.Rand, accs []simtypes.Account, count int) ([]simtypes.Account, error)

SelectAccounts selects count accounts from the ones provided.

func SelectEntries

func SelectEntries[E any](r *rand.Rand, entries []E, count int, entriesType string) ([]E, error)

SelectEntries selects count entries from the ones provided. The entriesType string is used in the error message to describe the entries slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

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