random

package
v0.0.0-...-8a3180e Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IBetween

func IBetween(x, n int) int

IBetween uses system entropy to seed the standard library rand package and pick a random value between X, and N

func NovaRandomInt64

func NovaRandomInt64() int64

NovaRandomInt64 will wrap up system commands and calculate hash sums for a pathetic attempt at generating entropy

Types

type Selector

type Selector struct {
	// contains filtered or unexported fields
}

Selector is a way to generate random items for a set of anything

func NewSelector

func NewSelector(v []interface{}) *Selector

NewSelector is a memory and system intensive struct that can be used to generate random items from a set

func (*Selector) Pick

func (s *Selector) Pick() interface{}

Pick is used to pick a random item from an initialized Selctor.

Jump to

Keyboard shortcuts

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