Permalink
Browse files

Fix typo on random numbers example

  • Loading branch information...
1 parent a4d9d2f commit 7dde60ce9707cd1cff1c238c0b187d5cebb77fd7 @poopoothegorilla poopoothegorilla committed with Sep 4, 2015
Showing with 5 additions and 0 deletions.
  1. +4 −0 examples/random-numbers/random-numbers.go
  2. +1 −0 examples/random-numbers/random-numbers.sh
View
4 examples/random-numbers/random-numbers.go
@@ -47,4 +47,8 @@ func main() {
fmt.Print(r2.Intn(100), ",")
fmt.Print(r2.Intn(100))
fmt.Println()
+ s3 := rand.NewSource(42)
+ r3 := rand.New(s3)
+ fmt.Print(r3.Intn(100), ",")
+ fmt.Print(r3.Intn(100))
}
View
1 examples/random-numbers/random-numbers.sh
@@ -2,6 +2,7 @@ $ go run random-numbers.go
81,87
0.6645600532184904
7.123187485356329,8.434115364335547
+0,28
5,87
5,87

0 comments on commit 7dde60c

Please sign in to comment.