Documentation
¶
Index ¶
- Variables
- func Fake(string string) string
- func FormatPrice(currency string, pAny any) string
- func NRandInt(nAny, minAny, maxAny any) []int
- func RandAlpha(n int) string
- func RandAlphaNum(n int) string
- func RandInt(minA, maxA any) int
- func RandNorm(meanA any, stdDevA any) float64
- func RandNumeric(n int) string
- func RandString(letters string, n int) string
- func Render(templateString string) string
- func Seed(x any) string
- func WeightedDateTimeSampler(start string, end string) string
- type CurrencyConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var AddlFuncs = map[string]any{ "pow": func(a, b int) int { return int(math.Pow(float64(a), float64(b))) }, "pseudoRandAlphaNum": RandAlphaNum, "pseudoRandAlpha": RandAlpha, "pseudoRandNumeric": RandNumeric, "pseudoRandString": RandString, "pseudoRandInt": RandInt, "pseudoRandNorm": RandNorm, "weightDatedTimeSample": WeightedDateTimeSampler, "nRandInt": NRandInt, "fake": Fake, "seed": Seed, "formatPrice": FormatPrice, }
Functions ¶
func FormatPrice ¶ added in v0.14.0
func NRandInt ¶ added in v0.14.0
NRandInt returns n unique values between the min (inclusive) and max (exclusive)
func RandAlphaNum ¶
RandAlphaNum generates a string consisting of characters in the range 0-9, a-z, and A-Z.
func RandNumeric ¶
RandNumeric generates a string consisting of characters in the range 0-9.
func RandString ¶
RandString is the internal function that generates a random string. It takes the length of the string and a string of allowed characters as parameters.
func WeightedDateTimeSampler ¶ added in v0.14.0
Types ¶
Click to show internal directories.
Click to hide internal directories.