GetRandomString 生成随机字符串
(len int)
| 19 | |
| 20 | //GetRandomString 生成随机字符串 |
| 21 | func GetRandomString(len int) string { |
| 22 | var resBuf strings.Builder |
| 23 | for i := 0; i < len; i++ { |
| 24 | resBuf.WriteByte(stringsBytes[randVar.Intn(strModelLength)]) |
| 25 | } |
| 26 | return resBuf.String() |
| 27 | } |
| 28 | |
| 29 | //GetRandomStringNum 生成随机数字字符串 |
| 30 | func GetRandomStringNum(len int) string { |
no test coverage detected