rand

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2021 License: MIT Imports: 5 Imported by: 1

README

Rand

Random generator for int, float64, string.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bytes

func Bytes(len int) []byte

Bytes returns a random byte slice value (visible characters) with given len.

func Float64

func Float64() float64

Float64 returns a random float64 value in [0, 1).

func Float64Range

func Float64Range(min, max float64) float64

Float64Range returns a random float64 value in [min, max).

func Int

func Int(max int) int

Int returns a random value in [0, max).

func NumBytes

func NumBytes(len int) []byte

NumBytes returns a random number byte slice value with given len.

func NumString

func NumString(len int) string

NumString returns a random number string value with given len.

func String

func String(len int) string

String returns a random string value with given len.

func Uint32

func Uint32() uint32

Uint32 returns a random value in [0, 2^32].

Types

This section is empty.

Jump to

Keyboard shortcuts

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