Documentation ¶
Overview ¶
math/rand扩展包,也包括生成随机字符串,随机选择等功能。
Index ¶
- Variables
- func Choice(choices ...interface{}) interface{}
- func ChoiceInt(choices ...int) int
- func ChoiceInt64(choices ...int64) int64
- func ChoiceSlice(choicesSlice interface{}) interface{}
- func ChoiceStr(choices ...string) string
- func ChoiceW(choices ...W) interface{}
- func Float64Between(low, high float64) float64
- func InitSeed()
- func InitToken(size int) string
- func Int64Between(low, high int64) int64
- func IntBetween(low, high int) int
- func RandomStr(n int) string
- func Str(set string, n int) string
- type W
Constants ¶
This section is empty.
Variables ¶
View Source
var ( LowerLetters = "abcdefghijklmnopqrstuvwxyz" UpperLetters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" Letters = LowerLetters + UpperLetters Numbers = "0123456789" LettersNumbers = Letters + Numbers )
Functions ¶
func ChoiceInt64 ¶
func ChoiceSlice ¶
func ChoiceSlice(choicesSlice interface{}) interface{}
func Float64Between ¶
func Int64Between ¶
func IntBetween ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.