detrand

package
v2.0.0-...-d24bc72 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2019 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package detrand provides deterministically random functionality.

The pseudo-randomness of these functions is seeded by the program binary itself and guarantees that the output does not change within a program, while ensuring that the output is unstable across different builds.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool() bool

Bool returns a deterministically random boolean.

func Disable

func Disable()

Disable disables detrand such that all functions returns the zero value. This function is not concurrent-safe and must be called during program init.

func Intn

func Intn(n int) int

Intn returns a deterministically random integer within [0,n).

Types

This section is empty.

Jump to

Keyboard shortcuts

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