aboutsummaryrefslogtreecommitdiff
path: root/test/sieve.go
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2008-07-12 13:56:33 -0700
committerRob Pike <r@golang.org>2008-07-12 13:56:33 -0700
commit2fdbf0d595ef701dc4c173aef11acfee967bd6ab (patch)
treeda316d7833f8cd39897dc89bec19b5c435388ab9 /test/sieve.go
parentd0cf215bf2c29a244a42375e145afd947a43b46c (diff)
downloadgo-2fdbf0d595ef701dc4c173aef11acfee967bd6ab.tar.gz
go-2fdbf0d595ef701dc4c173aef11acfee967bd6ab.zip
fix a couple of minor errors
SVN=126938
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 dd23903e16..365252260c 100644
--- a/test/sieve.go
+++ b/test/sieve.go
@@ -4,7 +4,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package Main
+package main
// Send the sequence 2, 3, 4, ... to channel 'ch'.
func Generate(ch *chan> int) {
@@ -30,13 +30,13 @@ func Sieve() {
go Generate(ch); // Start Generate() as a subprocess.
for {
prime := <ch;
- print "%d\n", prime;
+ print prime, "\n";
ch1 := new(chan int);
go Filter(ch, ch1, prime);
ch = ch1
}
}
-func Main() {
+func main() {
Sieve()
}