summaryrefslogtreecommitdiff
path: root/test/sieve.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-01-20 14:40:40 -0800
committerRuss Cox <rsc@golang.org>2009-01-20 14:40:40 -0800
commit72da6a7ce95c427fa91aafa30e0ccd4f64c871db (patch)
treef8305b165ee5ff41e9ef2b0f76e26f7ab3ece269 /test/sieve.go
parentb35f63b2763fbba37baefeddabdeb8d5c6132ea5 (diff)
downloadgo-72da6a7ce95c427fa91aafa30e0ccd4f64c871db.tar.gz
delete export
TBR=r OCL=23121 CL=23127
Diffstat (limited to 'test/sieve.go')
-rw-r--r--test/sieve.go6
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 {