@@ -4,7 +4,6 @@ package logo
6 "image/color"
6 "image/color"
10 "github.com/MakeNowJust/heredoc"
9 "github.com/MakeNowJust/heredoc"
@@ -53,7 +52,7 @@ func Render(version string, compact bool, o Opts) string {
54 stretchIndex := -1 // -1 means no stretching.
53 stretchIndex := -1 // -1 means no stretching.
55 if !compact {
54 if !compact {
56− stretchIndex = rand.IntN(len(letterforms))
55+ stretchIndex = cachedRandN(len(letterforms))
59 crush := renderWord(spacing, stretchIndex, letterforms...)
58 crush := renderWord(spacing, stretchIndex, letterforms...)
@@ -337,7 +336,7 @@ func stretchLetterformPart(s string, p letterformProps) string {
338 n := p.width
337 n := p.width
339 if p.stretch {
338 if p.stretch {
340− n = rand.IntN(p.maxStretch-p.minStretch) + p.minStretch //nolint:gosec
339+ n = cachedRandN(p.maxStretch-p.minStretch) + p.minStretch //nolint:gosec
342 parts := make([]string, n)
341 parts := make([]string, n)
343 for i := range parts {
342 for i := range parts {