Compare commits

..

No commits in common. "04dad7d5af13dc22cea0a6d73f94ccfb57776cff" and "4257994cabff89b53f23606b8165e20aeea32f69" have entirely different histories.

View file

@ -4,7 +4,7 @@ import (
"crypto/rand" "crypto/rand"
"encoding/hex" "encoding/hex"
"log" "log"
mathrand "math/rand/v2" mathrand "math/rand"
"strconv" "strconv"
"strings" "strings"
) )
@ -14,7 +14,7 @@ func GenerateUrl(length uint8) string {
listChars := []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789") listChars := []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789")
b := make([]rune, length) b := make([]rune, length)
for i := range b { for i := range b {
b[i] = listChars[mathrand.IntN(len(listChars))] b[i] = listChars[mathrand.Intn(len(listChars))]
} }
return string(b) return string(b)