Documentation ¶
Index ¶
- func GetNanoString(length int) (string, error)
- func GetRandBool(trueProb float64) (bool, error)
- func GetRandEmail() (string, error)
- func GetRandEmails(len int) ([]string, error)
- func GetRandFloat64(max float64) (float64, error)
- func GetRandFloat64InRange(min, max float64) (float64, error)
- func GetRandFloat64Norm(stdDev, mean float64) (float64, error)
- func GetRandFloat64NormInRange(min, max, stdDev, mean float64) (float64, error)
- func GetRandInt(max int) (int, error)
- func GetRandIntInRange(min int, max int) (int, error)
- func GetRandString(len int) (string, error)
- func GetUUID() uuid.UUID
- func GetUUIDString() string
- func PrepareProbability(in float64) float64
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetNanoString ¶
GetNanoString generate nano string
func GetRandBool ¶
GetRandBool genetate bool by probability of true response.
Example ¶
result, _ := GetRandBool(1) fmt.Print(result)
Output: true
func GetRandEmails ¶
GetRandEmails generate random emails
func GetRandFloat64InRange ¶
GetRandFloat64InRange ...
func GetRandFloat64Norm ¶
GetRandFloat64Norm generate random float64 with norm stdDev -standart deviation - σ^2; default = 1 mean - μ (In probability theory, the expected value is a generalization of the weighted average.); default = 0
func GetRandFloat64NormInRange ¶
GetRandFloat64NormInRange ...
func GetRandIntInRange ¶
GetRandIntInRange ...
func GetRandString ¶
GetRandString generate random string
func PrepareProbability ¶
PrepareProbability normalize value to 0.0..1.0
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.