Discover Packages
github.com/flanksource/gomplate/v3
random
package
Version:
v3.20.18
Opens a new window with list of versions in this module.
Published: Oct 16, 2023
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package random contains functions for generating random values
func Float(min, max float64) (float64, error)
func Item(items []interface{}) (interface{}, error)
func Number(min, max int64) (int64, error)
func StringBounds(count int, lower, upper rune) (r string, err error)
func StringRE(count int, match string) (r string, err error)
Float - For now this is really just a wrapper around `rand.Float64`
func Item(items []interface{}) (interface{}, error )
Item -
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.
StringRE - Generate a random string that matches a given regular
expression. Defaults to "[a-zA-Z0-9_.-]"
Source Files
¶
Click to show internal directories.
Click to hide internal directories.