seedrng

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package seedrng provides a utility function seedrng.EnsureSeeded() to seed the main math/rand RNG exactly once.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureSeeded

func EnsureSeeded()

EnsureSeeded seeds the math/rand PRNG on the first call; subsequent calls are no-ops. This allows EnsureSeeded() calls to be sprinkled around the codebase in packages that actively use the PRNG. That way, we always make sure the PRNG is seeded before it is used in anger.

func Reseed

func Reseed()

Types

This section is empty.

Jump to

Keyboard shortcuts

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