-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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: Tutorial contains stale code/advice (no need to seed rand anymore) #60627
Comments
@golang/tools-team |
I think it would be worth adding additional context rather than completely removing. I happened to be working through this example with go1.19.5 which seems to not init() the rand function, and as such had some mild confusion when my code matched but the output did not (fixed by adding a seed the example code did not have). Installing 1.20.5 seems to have solved the seed issue, but I think for newer users it may be nice to have this section call out the change of functionality from version X to version X and that older versions require manual init seeding. |
CC @ansaba |
Can anything be done about this? Every single developer who starts learning Go from the official website has had a frustrating experience right from the start for the last months, because the tutorial is broken. Every week someone creates a new issue. |
Change https://go.dev/cl/518475 mentions this issue: |
I think this was fixed by https://go.dev/cl/507096. Sorry for the delay. |
I would like to echo @jexlock's sentiment. I started going through the tutorial on a Linux Mint machine, and the Go version I get from |
Why there is no version control for the tutorial? |
Change https://go.dev/cl/557795 mentions this issue: |
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 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
Screenshot
What did you do?
--
What did you expect to see?
I expect to not see that paragraph. I assumed that there was an init() function for older versions of the code but forgot to change also the paragraph that explains the code.
Or maybe I am missing something about the language, I am new to GO.
What did you see instead?
The paragraph inside the blue border of the screenshot.
Have a great day!
The text was updated successfully, but these errors were encountered: