random

package
v4.0.0-pre-2 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package random contains functions for generating random values

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Float

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

Float - For now this is really just a wrapper around `rand.Float64`

func Item

func Item(items []interface{}) (interface{}, error)

Item -

func Number

func Number(min, max int64) (int64, error)

Number -

func StringBounds

func StringBounds(count int, lower, upper rune) (r string, err error)

StringBounds returns a random string of characters with a codepoint between the lower and upper bounds. Only valid characters are returned and if a range is given where no valid characters can be found, an error will be returned.

func StringRE

func StringRE(count int, match string) (r string, err error)

StringRE - Generate a random string that matches a given regular expression. Defaults to "[a-zA-Z0-9_.-]"

Types

This section is empty.

Jump to

Keyboard shortcuts

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