🎉🚀 May the concensus be with us!

This commit is contained in:
Brian Wiborg 2024-05-13 00:47:24 +02:00
commit 48328e7db2
No known key found for this signature in database
GPG key ID: BE53FA9286B719D6
33 changed files with 4051 additions and 0 deletions

15
utils/random.go Normal file
View file

@ -0,0 +1,15 @@
package utils
import (
"math/rand"
)
const charSet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
func GenerateRandomString(length int) string {
result := make([]byte, length)
for i := 0; i < length; i++ {
result[i] = charSet[rand.Intn(len(charSet))]
}
return string(result)
}