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: /doc/tutorial/random-greeting mentions a non-existing init function #61195

Closed
cajund opened this issue Jul 6, 2023 · 1 comment
Closed

Comments

@cajund
Copy link

cajund commented Jul 6, 2023

What is the URL of the page with the issue?

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

What did you do?

On this page, there is a set of bullets, one being:

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.

However, there is no init() function in the example code.

What did you expect to see?

Either the init() function in the code, or the removal of this bullet. An explanation as to how rand is seeded may help as it appears the rand.Seed()` function is depreciated.

Thanks!

@gopherbot gopherbot added this to the Unreleased milestone Jul 6, 2023
@dmitshur dmitshur changed the title x/website: x/website: /doc/tutorial/random-greeting mentions a non-existing init function Jul 6, 2023
@dmitshur
Copy link
Contributor

dmitshur commented Jul 6, 2023

Thanks. Closing as a duplicate of #60627.

@dmitshur dmitshur closed this as not planned Won't fix, can't repro, duplicate, stale Jul 6, 2023
@golang golang locked and limited conversation to collaborators Jul 5, 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

3 participants