This commit is contained in:
ari melody 2025-09-30 22:34:46 +01:00
parent 419781988a
commit 028ed60293
Signed by: ari
GPG key ID: CF99829C92678188
3 changed files with 2 additions and 7 deletions

View file

@ -5,7 +5,7 @@ import "math/rand"
func GenerateAlnumString(length int) []byte {
const CHARS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
res := []byte{}
for i := 0; i < length; i++ {
for range length {
res = append(res, CHARS[rand.Intn(len(CHARS))])
}
return res