From 36e959f5e2d589859c613ac8b0a134ebaf6cc967 Mon Sep 17 00:00:00 2001 From: Ada Date: Mon, 19 Feb 2024 00:32:27 +0100 Subject: [PATCH] :recycle: Use math/rand/v2 --- internal/utils/utils.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/utils/utils.go b/internal/utils/utils.go index e29556a..fe3369d 100644 --- a/internal/utils/utils.go +++ b/internal/utils/utils.go @@ -4,7 +4,7 @@ import ( "crypto/rand" "encoding/hex" "log" - mathrand "math/rand" + mathrand "math/rand/v2" "strconv" "strings" ) @@ -14,7 +14,7 @@ func GenerateUrl(length uint8) string { listChars := []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789") b := make([]rune, length) for i := range b { - b[i] = listChars[mathrand.Intn(len(listChars))] + b[i] = listChars[mathrand.IntN(len(listChars))] } return string(b) -- 2.45.2