package controller import "math/rand" func GenerateAlnumString(length int) []byte { const CHARS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" res := []byte{} for range length { res = append(res, CHARS[rand.Intn(len(CHARS))]) } return res }