Documentation ¶
Index ¶
- Variables
- type SeededRand
- func (sr *SeededRand) Choice(slice []interface{}) interface{}
- func (sr *SeededRand) RandomBool() bool
- func (sr *SeededRand) RandomFloat(min float64, max float64) float64
- func (sr *SeededRand) RandomInt(min int, max int) int
- func (sr *SeededRand) RandomString(length int, runes ...[]rune) string
- func (sr *SeededRand) SetSource(source rand.Source)
- func (sr *SeededRand) StringChoice(stringSlice *[]string) string
- func (sr *SeededRand) StringChoiceMultiple(stringSlice *[]string, numChoices int) []string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AlphabetLower = []rune("abcdefghijklmnopqrstuvwxyz") AlphabetUpper = []rune("ABCDEFGHIJKLMNOPQRSTUVWXYZ") Hex = []rune("0123456789abcdef") Numbers = []rune("0123456789") )
Functions ¶
This section is empty.
Types ¶
type SeededRand ¶
func NewSeededRand ¶
func NewSeededRand(seed int64) *SeededRand
func NewSeededRandFromString ¶
func NewSeededRandFromString(stringSeed string) *SeededRand
func NewSeededRandFromTime ¶
func NewSeededRandFromTime() *SeededRand
func (*SeededRand) Choice ¶
func (sr *SeededRand) Choice(slice []interface{}) interface{}
Generic functions
func (*SeededRand) RandomFloat ¶
func (sr *SeededRand) RandomFloat(min float64, max float64) float64
Float functions
func (*SeededRand) RandomString ¶
func (sr *SeededRand) RandomString(length int, runes ...[]rune) string
String functions
func (*SeededRand) SetSource ¶ added in v1.0.0
func (sr *SeededRand) SetSource(source rand.Source)
Getters and setters
func (*SeededRand) StringChoice ¶
func (sr *SeededRand) StringChoice(stringSlice *[]string) string
Array functions
func (*SeededRand) StringChoiceMultiple ¶
func (sr *SeededRand) StringChoiceMultiple(stringSlice *[]string, numChoices int) []string
Click to show internal directories.
Click to hide internal directories.