Documentation
¶
Index ¶
- Variables
- type Gen
- func (g *Gen) AlphaLower(bs []byte)
- func (g *Gen) AlphaUpper(bs []byte)
- func (g *Gen) Set(min uint64, max uint64, typicalCardinality uint64) map[uint64]struct{}
- func (g *Gen) StringFromList(list []string) string
- func (g *Gen) StringFromListWeighted(list []string) string
- func (g *Gen) StringSliceFromList(input []string, list []string) []string
- func (g *Gen) StringSliceFromListWeighted(input []string, list []string, s, v float64) []string
- type Opt
Constants ¶
This section is empty.
Variables ¶
var Animals = []string{}/* 626 elements not displayed */
Functions ¶
This section is empty.
Types ¶
type Gen ¶
func (*Gen) AlphaLower ¶
func (*Gen) AlphaUpper ¶
func (*Gen) Set ¶
Set generates a random set of integers between min and max (inclusive). The mean cardinality of the set is specified by typicalCardinality.
func (*Gen) StringFromList ¶
StringFromList returns a random string from the list each with uniform probability
func (*Gen) StringFromListWeighted ¶
StringFromListWeighted returns a random string from the list weighted toward the items earlier in the list.
func (*Gen) StringSliceFromList ¶
StringSliceFromList repopulates input with a random number of items from list. If input does not have enough capacity it may return a new list. There may be repeat items, there may be 0 items, there will never be more items than the length of list.
func (*Gen) StringSliceFromListWeighted ¶
StringSliceFromListWeighted picks between 0 and upto items from list randomly, but zipfian weighted toward items earlier in list. It will try to re-use input, but may allocate a new list if needed.