]> Cypherpunks.ru repositories - gostls13.git/commitdiff
builtin: clarify effect of close on receive
authorSean Liao <sean@liao.dev>
Mon, 23 May 2022 22:52:21 +0000 (23:52 +0100)
committerGopher Robot <gobot@golang.org>
Tue, 24 May 2022 19:45:14 +0000 (19:45 +0000)
Fixes #53041

Change-Id: If6580c8f0f14edfdc297d3239a7767ce0570ff79
Reviewed-on: https://go-review.googlesource.com/c/go/+/407975
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Rob Pike <r@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>

src/builtin/builtin.go

index e3e4df9de6818e055605e032852432287dbebc0b..7feb209bb4992b20178d946d85a6a13c8a7c582c 100644 (file)
@@ -236,7 +236,7 @@ func imag(c ComplexType) FloatType
 //
 //     x, ok := <-c
 //
-// will also set ok to false for a closed channel.
+// will also set ok to false for a closed and empty channel.
 func close(c chan<- Type)
 
 // The panic built-in function stops normal execution of the current