diff options
| author | Rob Pike <r@golang.org> | 2009-03-18 14:09:16 -0700 |
|---|---|---|
| committer | Rob Pike <r@golang.org> | 2009-03-18 14:09:16 -0700 |
| commit | b2dc154421eb830c812e089b2b69a0c728704b5b (patch) | |
| tree | d1599c2c8816a88bd3673cb13cab4d3f1c8e6e45 /doc/progs/sieve1.go | |
| parent | 0bacb74554806871b8d354ed9f07163989bb8755 (diff) | |
| download | golang-b2dc154421eb830c812e089b2b69a0c728704b5b.tar.gz | |
remove print() from the tutorial, generating a little clumsiness around "import"
R=rsc,gri
DELTA=103 (36 added, 33 deleted, 34 changed)
OCL=26442
CL=26491
Diffstat (limited to 'doc/progs/sieve1.go')
| -rw-r--r-- | doc/progs/sieve1.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/progs/sieve1.go b/doc/progs/sieve1.go index c9b27f061..567f5d9bb 100644 --- a/doc/progs/sieve1.go +++ b/doc/progs/sieve1.go @@ -4,6 +4,8 @@ package main +import "fmt" + // Send the sequence 2, 3, 4, ... to returned channel func generate() chan int { ch := make(chan int); @@ -44,6 +46,6 @@ func sieve() chan int { func main() { primes := sieve(); for { - print(<-primes, "\n"); + fmt.Println(<-primes); } } |
