Skip to content

Commit

Permalink
content: make description about rand.Intn less ambiguous
Browse files Browse the repository at this point in the history
Technically rand.Intn will always return the same sequence of
numbers, however in this context, re-running the example will
always produce the same value.

Fixes golang/go#12370

Change-Id: Iea87a4b1b0db1a919a35b00d0d4af497fafd1319
Reviewed-on: https://go-review.googlesource.com/15555
Reviewed-by: Andrew Gerrand <adg@golang.org>
  • Loading branch information
kytrinyx authored and adg committed Oct 8, 2015
1 parent 3ae3ac9 commit a2f217e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion content/basics.article
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ This program is using the packages with import paths `"fmt"` and `"math/rand"`.
By convention, the package name is the same as the last element of the import path. For instance, the `"math/rand"` package comprises files that begin with the statement `package`rand`.

#appengine: *Note:* the environment in which these programs are executed is
#appengine: deterministic, so `rand.Intn` will always return the same number.
#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 [[http://golang.org/pkg/math/rand/#Seed][`rand.Seed`]].)

Expand Down

0 comments on commit a2f217e

Please sign in to comment.