diff options
author | Russ Cox <rsc@golang.org> | 2009-01-20 14:40:40 -0800 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-01-20 14:40:40 -0800 |
commit | 4ae0ed29a283c16d1c83ef704c4d75170c3801e6 (patch) | |
tree | f8305b165ee5ff41e9ef2b0f76e26f7ab3ece269 /test/sieve.go | |
parent | 3986ef877ccd4db750b5050e318dff78f7e55d19 (diff) | |
download | golang-4ae0ed29a283c16d1c83ef704c4d75170c3801e6.tar.gz |
delete export
TBR=r
OCL=23121
CL=23127
Diffstat (limited to 'test/sieve.go')
-rw-r--r-- | test/sieve.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/sieve.go b/test/sieve.go index f6a07277f..e16345617 100644 --- a/test/sieve.go +++ b/test/sieve.go @@ -7,7 +7,7 @@ package main // Send the sequence 2, 3, 4, ... to channel 'ch'. -export 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 @@ export func Generate(ch chan<- int) { // Copy the values from channel 'in' to channel 'out', // removing those divisible by 'prime'. -export 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 { @@ -25,7 +25,7 @@ export func Filter(in <-chan int, out chan<- int, prime int) { } // The prime sieve: Daisy-chain Filter processes together. -export func Sieve() { +func Sieve() { ch := make(chan int); // Create a new channel. go Generate(ch); // Start Generate() as a subprocess. for { |