random

package
v3.20.18 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: MIT Imports: 6 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