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: "Random greeting" tutorial says code should have "init" method but no "init" method in the code #61140

Closed
pt7481 opened this issue Jul 2, 2023 · 3 comments

Comments

@pt7481
Copy link

pt7481 commented Jul 2, 2023

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

Screen Shot 2023-07-01 at 5 27 20 PM

What did you do?

Just load the page.

What did you expect to see?

The tutorial says the greetings.go code should include an "init" method per the following bullet:

  • "Add an init function to seed the rand package with the current time. Go executes init functions automatically at program startup, after global variables have been initialized. For more about init functions, see Effective Go."

Given the above, I expected to see an "init" function in the greetings.go code.

What did you see instead?

I did not see an "init" function in the greetings.go code.

@gopherbot gopherbot added this to the Unreleased milestone Jul 2, 2023
@seankhliao
Copy link
Member

Duplicate of #60627

@seankhliao seankhliao marked this as a duplicate of #60627 Jul 2, 2023
@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Jul 2, 2023
@golang golang locked and limited conversation to collaborators Jul 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants
@gopherbot @pt7481 @seankhliao and others