Commit 00dd2b4a authored by Rob Pike's avatar Rob Pike

builtin: correct description of a closed channel.

R=golang-dev, dvyukov
CC=golang-dev
https://golang.org/cl/4896046
parent 43d63893
...@@ -104,10 +104,10 @@ func imag(c ComplexType) FloatType ...@@ -104,10 +104,10 @@ func imag(c ComplexType) FloatType
// bidirectional or send-only. It should be executed only by the sender, // 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 // 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 // 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 // x, ok := <-c
// will set x to the channel element's zero value and ok to false, and select // will also set ok to false for a closed channel.
// clauses involving c will never execute.
func close(c chan<- Type) func close(c chan<- Type)
// The panic built-in function stops normal execution of the current // The panic built-in function stops normal execution of the current
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment