Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( RandomString = []string{ RandomNum: "0123456789", RandomLower: "abcdefghijklmnopqrstuvwxyz", RandomUpper: "ABCDEFGHIJKLMNOPQRSTUVWXYZ", RandomLowerNum: "0123456789abcdefghijklmnopqrstuvwxyz", RandomUpperNum: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ", RandomAll: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", } )
RandomString defines
Functions ¶
func GenerateRandom ¶
func GenerateRandom(size int, kind ...RandomKind) []byte
GenerateRandom random characters with []byte
func GenerateRandomString ¶
func GenerateRandomString(size int, kind ...RandomKind) string
GenerateRandomString 随机字符串
Types ¶
type RandomKind ¶
type RandomKind int
RandomKind RandomKind
const ( RandomNum RandomKind = iota // 纯数字 RandomLower // 小写字母 RandomUpper // 大写字母 RandomLowerNum // 数字、小写字母 RandomUpperNum // 数字、大写字母 RandomAll // 数字、大小写字母 )
random kinds
Click to show internal directories.
Click to hide internal directories.