randomtools

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: GPL-3.0 Imports: 8 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRandomBool

func GetRandomBool(trueProb float64) (bool, error)

func GetRandomEmails added in v0.2.3

func GetRandomEmails(len int) ([]string, error)

func NanoString added in v0.2.3

func NanoString(length int) (string, error)

func PrepareProbability

func PrepareProbability(in float64) float64

func RandEmail added in v0.2.3

func RandEmail() (string, error)

func RandFloat64

func RandFloat64(max float64) (float64, error)

func RandFloat64InRange

func RandFloat64InRange(min, max float64) (float64, error)

func RandFloat64Norm

func RandFloat64Norm(stdDev, mean float64) (float64, error)

RandFloat64Norm stdDev -standart deviation - σ^2; default = 1 mean - μ (In probability theory, the expected value is a generalization of the weighted average.); default = 0

func RandFloat64NormInRange

func RandFloat64NormInRange(min, max, stdDev, mean float64) (float64, error)

func RandInt

func RandInt(max int) (int, error)

func RandIntInRange

func RandIntInRange(min int, max int) (int, error)

func RandString added in v0.2.3

func RandString(len int) (string, error)

func UUID

func UUID() uuid.UUID

func UUIDString

func UUIDString() string

Types

This section is empty.

Jump to

Keyboard shortcuts

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