aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2011-08-16 16:03:30 +1000
committerRob Pike <r@golang.org>2011-08-16 16:03:30 +1000
commit00dd2b4ab92b4491466196d69942ccb9eb5b4721 (patch)
tree985b3bd4b9093bd8a3ff3a6a2332ef88376b2d64
parent43d6389397651948cd5f1bb94426d2fc3c14aece (diff)
downloadgo-00dd2b4ab92b4491466196d69942ccb9eb5b4721.tar.gz
go-00dd2b4ab92b4491466196d69942ccb9eb5b4721.zip
builtin: correct description of a closed channel.
R=golang-dev, dvyukov CC=golang-dev https://golang.org/cl/4896046
-rw-r--r--src/pkg/builtin/builtin.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pkg/builtin/builtin.go b/src/pkg/builtin/builtin.go
index f835580de8..07acce4f70 100644
--- a/src/pkg/builtin/builtin.go
+++ b/src/pkg/builtin/builtin.go
@@ -104,10 +104,10 @@ func imag(c ComplexType) FloatType
// bidirectional or send-only. It should be executed only by the sender,
// never the receiver, and has the effect of shutting down the channel after
// the last sent value is received. After the last value has been received
-// from a closed channel c,
+// from a closed channel c, any receive from c will succeed without
+// blocking, returning the zero value for the channel element. The form
// x, ok := <-c
-// will set x to the channel element's zero value and ok to false, and select
-// clauses involving c will never execute.
+// will also set ok to false for a closed channel.
func close(c chan<- Type)
// The panic built-in function stops normal execution of the current