# README
随机数生成器包,可以生成随机[]bytes, int, string。
import "github.com/x-module/helper/random"
函数列表:
- RandBytes : 生成随机字节切片。
- RandInt : 生成随机int, 范围[min, max)。
- RandString : 生成给定长度的随机字符串,只包含字母(a-zA-Z)。
- RandUpper : 生成给定长度的随机大写字母字符串(A-Z)。
- RandLower : 生成给定长度的随机小写字母字符串(a-z)。
- RandNumeral : 生成给定长度的随机数字字符串(0-9)。
- RandNumeralOrLetter : 生成给定长度的随机字符串(数字+字母)。
- UUIdV4 : 生成UUID v4字符串。
- GetUUIdByTime : 生成基于时间的UUID字符串。
- IdUUIdByRand : 生成随机的UUID字符串。
# Functions
GetUUIdByTime 根据时间生成UUID true去除“-”,false不去除.
IdUUIdByRand V4 基于随机数 true去除“-”,false不去除.
RandBytes 生成随机字节片.
RandInt 在min和max之间生成随机整数,可能是min,而不是max。.
RandLower 生成一个随机小写字符串。.
RandNumeral 生成指定长度的随机数字字符串。.
RandNumeralOrLetter 生成一个随机数字或字母字符串。.
RandString 生成指定长度的随机字符串。.
RandUpper 生成一个随机大写字符串。.
UUIdV4 根据RFC 4122生成版本4的随机UUID。.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author