Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPseudoRand ¶
NewPseudoRand returns an instance of math/rand.Rand seeded from crypto/rand and its seed so we can easily and cheaply generate unique streams of numbers. The created object is not safe for concurrent access.
func RandIntInRange ¶
RandIntInRange returns a value in [min, max)
func SeedForTests ¶
func SeedForTests()
SeedForTests seeds the random number generator and prints the seed value used. This value can be specified via an environment variable RANDOM_SEED=x to reuse the same value later. This function should be called from TestMain; individual tests should not touch the seed of the global random number generator.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.