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

tour: The note about deterministic execution is not actual anymore with automatic seeds starting from Go 1.20 #1444

Closed
mrhakimov opened this issue Feb 13, 2023 · 1 comment

Comments

@mrhakimov
Copy link

Context: https://go.dev/tour/basics/1

According to the Go 1.20 Release Notes:

The math/rand package now automatically seeds the global random number generator with a random value

So, the note from the tour:

Note: The environment in which these programs are executed is deterministic, so each time you run the example program rand.Intn will return the same number.

(To see a different number, seed the number generator; see [rand.Seed](https://go.dev/pkg/math/rand/#Seed). Time is constant in the playground, so you will need to use something else as the seed.)

is not actual anymore

@crisman
Copy link

crisman commented Feb 22, 2023

Same as #1448, can be closed.

Fixed in golang/website#194

@ALTree ALTree closed this as completed Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants