Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const pool = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"
- func generateId(n int) string {
- b := make([]byte, n)
- for i := range b {
- b[i] = pool[rand.Intn(len(pool))]
- }
- return string(b)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement