diff --git a/doc/go_lang.txt b/doc/go_lang.txt index 3159b3f3f01..f58cdae1182 100644 --- a/doc/go_lang.txt +++ b/doc/go_lang.txt @@ -161,7 +161,7 @@ Here is a complete example Go program that implements a concurrent prime sieve: // Copy the values from channel 'in' to channel 'out', // removing those divisible by 'prime'. func Filter(in *chan< int, out *chan> int, prime int) { - for ; ; { + for { i := out = i; // Send 'i' to channel 'out'. @@ -173,7 +173,7 @@ Here is a complete example Go program that implements a concurrent prime sieve: func Sieve() { ch := new(chan int); // Create a new channel. go Generate(ch); // Start Generate() as a subprocess. - for ; ; { + for { prime :=