优化字符串生成
This commit is contained in:
parent
9100303a3b
commit
f62e82ecd0
@ -24,8 +24,8 @@ func GenRandomString(source string, length uint) string {
|
||||
return ""
|
||||
}
|
||||
if len(source) == 0 {
|
||||
//字符串为空,默认字符源为如下:
|
||||
source = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||
//字符串为空,默认字符源为如下(去除易混淆的i/l):
|
||||
source = "0123456789abcdefghjkmnopqrstuvwxyzABCDEFGHJKMNOPQRSTUVWXYZ"
|
||||
}
|
||||
strByte := []byte(source)
|
||||
var genStrByte = make([]byte, 0)
|
||||
|
Loading…
Reference in New Issue
Block a user