Documentation ¶
Index ¶
- Constants
- func Digits(length int, hasLeadingZero ...bool) string
- func Float32(min, max float32) float32
- func Float64(min, max float64) float64
- func Int(min, max int) int
- func Int32(min, max int32) int32
- func Int64(min, max int64) int64
- func Letters(length int) string
- func Lucky(probability float64, base ...float64) bool
- func Rand() *rand.Rand
- func Shuffle(list []interface{})
- func Str(seed string, length int) (str string)
- func Symbols(length int) string
- func Weight(fn func(v interface{}) float64, list ...interface{}) int
Constants ¶
View Source
const ( LetterSeed = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" // 字母字 LetterLowerSeed = "abcdefghijklmnopqrstuvwxyz" // 小写字母 LetterUpperSeed = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" // 大写字母 DigitSeed = "0123456789" // 数字 DigitWithoutZeroSeed = "123456789" // 无0数字 SymbolSeed = "!\\\"#$%&'()*+,-./:;<=>?@[\\\\]^_`{|}~" // 特殊字符 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.