Documentation ¶
Overview ¶
包grand提供了高性能的随机字节/数字/字符串生成功能。
Index ¶
- func Meet(num, total int) bool
- func MeetProb(prob float32) bool
- func X从文本生成文本(给定文本 string, 长度 int) string
- func X区间整数(最小值, 最大值 int) int
- func X字母文本(长度 int) string
- func X字节集(长度 int) []byte
- func X数字文本(长度 int) string
- func X整数(最大值 int) int
- func X整数数组(长度 int) []int
- func X文本(长度 int, 包含特殊字符 ...bool) string
- func X时长(最小值, 最大值 time.Duration) time.Duration
- func X特殊字符文本(长度 int) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func X整数 ¶
Intn 返回一个在0和max之间的随机整数: [0, max)。
注意事项: 1. 参数`max`必须大于0,否则函数直接返回`max`; 2. 返回结果大于等于0且小于`max`; 3. 返回的随机数是32位整数,并且小于math.MaxUint32。
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.