Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/website: use of deprecated math/rand.Seed in the tutorial docs #58958

Closed
RemoteSalad opened this issue Mar 10, 2023 · 1 comment
Closed

x/website: use of deprecated math/rand.Seed in the tutorial docs #58958

RemoteSalad opened this issue Mar 10, 2023 · 1 comment
Labels
Documentation NeedsFix The path to resolution is known, but the work has not been done. website

Comments

@RemoteSalad
Copy link

What is the URL of the page with the issue?

https://go.dev/doc/tutorial/random-greeting

What is your user agent?

Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0

Screenshot

image

What did you do?

Followed the introductory tutorials

What did you expect to see?

n/a

What did you see instead?

Code examples that produced warnings from the go-staticcheck linter based on #56319 or #54880

rand.Seed has been deprecated since Go 1.20 and an alternative has been available since Go 1.0: Programs that call Seed and then expect a specific sequence of results from the global random source (using functions such as Int) can be broken when a dependency changes how much it consumes from the global random source. To avoid such breakages, programs that need a specific result sequence should use NewRand(NewSource(seed)) to obtain a random generator that other packages cannot access. (SA1019)go-staticcheck

The math/rand module's documentation

@gopherbot gopherbot added this to the Unreleased milestone Mar 10, 2023
@seankhliao seankhliao changed the title x/website:Deprecated use of math/rand.Seed() in the tutorial docs x/website: Deprecated use of math/rand.Seed() in the tutorial docs Mar 10, 2023
@gopherbot
Copy link

Change https://go.dev/cl/475275 mentions this issue: _content/doc/tutorial: remove use of deprecated math/rand.Seed

@seankhliao seankhliao changed the title x/website: Deprecated use of math/rand.Seed() in the tutorial docs x/website: use of deprecated math/rand.Seed in the tutorial docs Mar 10, 2023
@seankhliao seankhliao added the NeedsFix The path to resolution is known, but the work has not been done. label Mar 10, 2023
@jamalc jamalc modified the milestones: Unreleased, website/later Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation NeedsFix The path to resolution is known, but the work has not been done. website
Projects
None yet
Development

No branches or pull requests

5 participants