[website] _content/doc/tutorial: remove mention of init function

0 views
Skip to first unread message

Hyang-Ah Hana Kim (Gerrit)

unread,
Aug 10, 2023, 3:27:07 PM8/10/23
to Gerrit Bot, Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Gopher Robot, Robert Findley, golang-co...@googlegroups.com

Hyang-Ah Hana Kim submitted this change.

View Change

Approvals: Hyang-Ah Hana Kim: Looks good to me, approved; Run TryBots Robert Findley: Looks good to me, but someone else must approve Gopher Robot: TryBots succeeded
_content/doc/tutorial: remove mention of init function

the init function is removed from the code example: https://github.com/golang/website/commit/f7341273feb9c0d7d7e12a52d975e7834bf32aa1

Change-Id: Id247fed6f46ad83e47c9871519ed8001dca79c62
GitHub-Last-Rev: 012feea9ebd1e0d68424c25dd8560138fe6182e9
GitHub-Pull-Request: golang/website#230
Reviewed-on: https://go-review.googlesource.com/c/website/+/507096
Reviewed-by: Hyang-Ah Hana Kim <hya...@gmail.com>
TryBot-Result: Gopher Robot <go...@golang.org>
Run-TryBot: Hyang-Ah Hana Kim <hya...@gmail.com>
Reviewed-by: Robert Findley <rfin...@google.com>
---
M _content/doc/tutorial/random-greeting.html
1 file changed, 0 insertions(+), 7 deletions(-)

diff --git a/_content/doc/tutorial/random-greeting.html b/_content/doc/tutorial/random-greeting.html
index ee65a08..96d4ea5 100644
--- a/_content/doc/tutorial/random-greeting.html
+++ b/_content/doc/tutorial/random-greeting.html
@@ -92,13 +92,6 @@
to generate a random number for selecting an item from the slice.
</li>
<li>
- Add an <code>init</code> function to seed the <code>rand</code> package
- with the current time. Go executes <code>init</code> functions
- automatically at program startup, after global variables have been
- initialized. For more about <code>init</code> functions, see
- <a href="/doc/effective_go.html#init">Effective Go</a>.
- </li>
- <li>
In <code>Hello</code>, call the <code>randomFormat</code> function to
get a format for the message you'll return, then use the format and
<code>name</code> value together to create the message.

To view, visit change 507096. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: website
Gerrit-Branch: master
Gerrit-Change-Id: Id247fed6f46ad83e47c9871519ed8001dca79c62
Gerrit-Change-Number: 507096
Gerrit-PatchSet: 2
Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
Gerrit-Reviewer: Robert Findley <rfin...@google.com>
Reply all
Reply to author
Forward
0 new messages