summaryrefslogtreecommitdiff
path: root/misc/cgo/stdio/chain.go
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2011-01-17 12:40:45 +0100
committerOndřej Surý <ondrej@sury.org>2011-01-17 12:40:45 +0100
commit3e45412327a2654a77944249962b3652e6142299 (patch)
treebc3bf69452afa055423cbe0c5cfa8ca357df6ccf /misc/cgo/stdio/chain.go
parentc533680039762cacbc37db8dc7eed074c3e497be (diff)
downloadgolang-upstream/2011.01.12.tar.gz
Imported Upstream version 2011.01.12upstream/2011.01.12
Diffstat (limited to 'misc/cgo/stdio/chain.go')
-rw-r--r--misc/cgo/stdio/chain.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/misc/cgo/stdio/chain.go b/misc/cgo/stdio/chain.go
index dd5e01542..c2b105072 100644
--- a/misc/cgo/stdio/chain.go
+++ b/misc/cgo/stdio/chain.go
@@ -22,7 +22,7 @@ func link(left chan<- int, right <-chan int) {
runtime.LockOSThread()
for {
v := <-right
- stdio.Puts(strconv.Itoa(v))
+ stdio.Stdout.WriteString(strconv.Itoa(v) + "\n")
left <- 1+v
}
}
@@ -38,6 +38,6 @@ func main() {
for i := 0; i < R; i++ {
right <- 0
x := <-leftmost
- stdio.Puts(strconv.Itoa(x))
+ stdio.Stdout.WriteString(strconv.Itoa(x) + "\n")
}
}