优化字符串生成

This commit is contained in:
zhangdeman committed 2021-08-14 23:51:41 +08:00
1 parent 9100303a3b
commit f62e82ecd0
1 file changed
+2 -2
+2 -2
View File
@@ -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)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.