tutorial: replace the forever loops with finite counts in sieve programs.
Fixes #1742.
I hope.
Also this picks up an update to go_tutorial.html that should already have happened.
R=brainman, rsc, peterGo
CC=golang-dev
https://golang.org/cl/4452050
diff --git a/doc/progs/sieve1.go b/doc/progs/sieve1.go
index 71468d0..e785e20 100644
--- a/doc/progs/sieve1.go
+++ b/doc/progs/sieve1.go
@@ -45,7 +45,7 @@
func main() {
primes := sieve()
- for {
+ for i := 0; i < 100; i++ { // Print the first hundred primes.
fmt.Println(<-primes)
}
}