From: Sean Liao Date: Mon, 23 May 2022 22:52:21 +0000 (+0100) Subject: builtin: clarify effect of close on receive X-Git-Tag: go1.19beta1~127 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=0a30cf9536f06d52a214370e9eeb03f8bcfc1e6a;p=gostls13.git builtin: clarify effect of close on receive Fixes #53041 Change-Id: If6580c8f0f14edfdc297d3239a7767ce0570ff79 Reviewed-on: https://go-review.googlesource.com/c/go/+/407975 Reviewed-by: Dmitri Shuralyov Run-TryBot: Ian Lance Taylor Reviewed-by: Ian Lance Taylor Auto-Submit: Ian Lance Taylor Reviewed-by: Rob Pike TryBot-Result: Gopher Robot --- diff --git a/src/builtin/builtin.go b/src/builtin/builtin.go index e3e4df9de6..7feb209bb4 100644 --- a/src/builtin/builtin.go +++ b/src/builtin/builtin.go @@ -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