You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
The text was updated successfully, but these errors were encountered:
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 howrand
is seeded may help as it appears the rand.Seed()` function is depreciated.Thanks!
The text was updated successfully, but these errors were encountered: