- 博客(1)
- 资源 (1)
- 收藏
- 关注
原创 Golang 优雅地生成随机字符串
//随机字符串 func GetRandomString(n int) string { str := "0123456789abcdefghijklmnopqrstuvwxyz" bytes := []byte(str) var result []byte for i := 0; i < n; i++ { result = append(result, bytes[rand.Intn(len(bytes))]) } return string(res.
2021-07-09 13:48:23
1077
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人