summaryrefslogtreecommitdiff
path: root/test/sieve.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2008-12-19 03:05:37 -0800
committerRuss Cox <rsc@golang.org>2008-12-19 03:05:37 -0800
commit65e4c6bf1819903c1b751a3b305a6d2ec07cc283 (patch)
tree183e8cd345f5f895d2cbc36dd8f8be93640303c3 /test/sieve.go
parent89995dcecf37b9a21c26783dcf8ab506da237363 (diff)
downloadgolang-65e4c6bf1819903c1b751a3b305a6d2ec07cc283.tar.gz
change *map to map; *chan to chan; new(T) to new(*T)
fix bugs left over from *[] to [] conversion. TBR=r OCL=21576 CL=21581
Diffstat (limited to 'test/sieve.go')
-rw-r--r--test/sieve.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/sieve.go b/test/sieve.go
index 366d5b94c..91fa6e5f0 100644
--- a/test/sieve.go
+++ b/test/sieve.go
@@ -7,7 +7,7 @@
package main
// Send the sequence 2, 3, 4, ... to channel 'ch'.
-func Generate(ch *chan<- int) {
+func Generate(ch chan<- int) {
for i := 2; ; i++ {
ch <- i // Send 'i' to channel 'ch'.
}
@@ -15,7 +15,7 @@ func Generate(ch *chan<- int) {
// Copy the values from channel 'in' to channel 'out',
// removing those divisible by 'prime'.
-func Filter(in *<-chan int, out *chan<- int, prime int) {
+func Filter(in <-chan int, out chan<- int, prime int) {
for {
i := <-in; // Receive value of new variable 'i' from 'in'.
if i % prime != 0 {