rand

package
v1.19.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 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, min, max 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