home to your local SPACEGIRL 馃挮 arimelody.space
at dev 13 lines 292 B view raw
1package controller 2 3import "math/rand" 4 5func GenerateAlnumString(length int) []byte { 6 const CHARS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" 7 res := []byte{} 8 for range length { 9 res = append(res, CHARS[rand.Intn(len(CHARS))]) 10 } 11 return res 12} 13