mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
builtin: document clear is a no-op if its argument's value is nil
Just like the builtin function delete's comment does.
Change-Id: Id94a3aaa03c7b09594bae2b1af901d9060d9e255
GitHub-Last-Rev: 30cbebca96
GitHub-Pull-Request: golang/go#70801
Reviewed-on: https://go-review.googlesource.com/c/go/+/635535
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Keith Randall <khr@golang.org>
This commit is contained in:
parent
077d51909d
commit
9118060040
1 changed files with 1 additions and 1 deletions
|
|
@ -247,7 +247,7 @@ func imag(c ComplexType) FloatType
|
||||||
// to the zero value of the respective element type. If the argument
|
// to the zero value of the respective element type. If the argument
|
||||||
// type is a type parameter, the type parameter's type set must
|
// type is a type parameter, the type parameter's type set must
|
||||||
// contain only map or slice types, and clear performs the operation
|
// contain only map or slice types, and clear performs the operation
|
||||||
// implied by the type argument.
|
// implied by the type argument. If t is nil, clear is a no-op.
|
||||||
func clear[T ~[]Type | ~map[Type]Type1](t T)
|
func clear[T ~[]Type | ~map[Type]Type1](t T)
|
||||||
|
|
||||||
// The close built-in function closes a channel, which must be either
|
// The close built-in function closes a channel, which must be either
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue