only return lowercase

This commit is contained in:
Hazel Noack 2025-06-30 12:21:41 +02:00
parent 18e9322013
commit 9ea2158def

View File

@ -2,9 +2,10 @@ package words
import (
"math/rand/v2"
"strings"
)
func GetRandomWord() string {
// https://stackoverflow.com/a/22876612/16804841
return Words[rand.IntN(len(Words))]
return strings.ToLower(Words[rand.IntN(len(Words))])
}