Skip to content

Commit f734127

Browse files
seankhliaogopherbot
authored andcommitted
_content/doc/tutorial: remove use of deprecated math/rand.Seed
Fixes golang/go#58958 Change-Id: I5ef84f2fd350e3048649cf281e8272e62b2fc052 Reviewed-on: https://go-review.googlesource.com/c/website/+/475275 Run-TryBot: Bryan Mills <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> Reviewed-by: Bryan Mills <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
1 parent da86378 commit f734127

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

_content/doc/tutorial/greetings-multiple-people.html

-5
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,6 @@
7373
return messages, nil
7474
}</ins>
7575

76-
// Init sets initial values for variables used in the function.
77-
func init() {
78-
rand.Seed(time.Now().UnixNano())
79-
}
80-
8176
// randomFormat returns one of a set of greeting messages. The returned
8277
// message is selected at random.
8378
func randomFormat() string {

_content/doc/tutorial/random-greeting.html

+1-6
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,7 @@
5151
return message, nil
5252
}
5353

54-
<ins>// init sets initial values for variables used in the function.
55-
func init() {
56-
rand.Seed(time.Now().UnixNano())
57-
}
58-
59-
// randomFormat returns one of a set of greeting messages. The returned
54+
<ins>// randomFormat returns one of a set of greeting messages. The returned
6055
// message is selected at random.
6156
func randomFormat() string {
6257
// A slice of message formats.

0 commit comments

Comments
 (0)