Go:math/rand
lastmod 2025-11-28created 2025-11-283 edits
Troubleshooting
rand.Seed has been deprecated since Go 1.20
rand.Seed has been deprecated since Go 1.20 and an alternative has been available since Go 1.0: As of Go 1.20 there is no reason to call Seed with a random value. Programs that call Seed with a known value to get a specific sequence of results should use New(NewSource(seed)) to obtain a local random generator. (SA1019)
Change it as follows:
See also
Pages that link here