diff options
| author | Rob Phoenix <rob@robphoenix.com> | 2017-06-06 10:10:09 +0100 |
|---|---|---|
| committer | Andrew Gerrand <adg@golang.org> | 2017-06-20 22:22:01 +0000 |
| commit | d844dc7a157c5d2e92bccc9732530c37bc7ef33b (patch) | |
| tree | 9cc9197012f9987417e4bf05f79569039eeebeec | |
| parent | 624453ede3b6c5a2fef96c5a2cf1d8abdad35be1 (diff) | |
| download | golang-id-tour-d844dc7a157c5d2e92bccc9732530c37bc7ef33b.tar.xz | |
content: add note about using rand.Seed with the time
Fixes golang/tour#12
Change-Id: I3e31796e68052c424ef6b5670aac516e461d1809
Reviewed-on: https://go-review.googlesource.com/44931
Reviewed-by: Andrew Gerrand <adg@golang.org>
| -rw-r--r-- | content/basics.article | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/content/basics.article b/content/basics.article index fd17b60..528eaf1 100644 --- a/content/basics.article +++ b/content/basics.article @@ -18,13 +18,14 @@ By convention, the package name is the same as the last element of the import pa #appengine: deterministic, so each time you run the example program #appengine: `rand.Intn` will return the same number. #appengine: -#appengine: (To see a different number, seed the number generator; see [[https://golang.org/pkg/math/rand/#Seed][`rand.Seed`]].) +#appengine: (To see a different number, seed the number generator; see [[https://golang.org/pkg/math/rand/#Seed][`rand.Seed`]]. +#appengine: Time is constant in the playground, so you will need to use something else as the seed.) .play basics/packages.go * Imports -This code groups the imports into a parenthesized, "factored" import statement. +This code groups the imports into a parenthesized, "factored" import statement. You can also write multiple import statements, like: |
