mirror of
https://github.com/golang/go
synced 2024-11-26 17:56:55 -07:00
doc: minor clarification regarding the sharing of underlying arrays
The last sentence in the section on slice expressions could be read as if it might apply to strings. Changed the sentence a bit to emphasize its applicability to slices only. See also the issue for more background. Fixes #19220. Change-Id: I8551f34230e4ed93f951e7b871cc81f54a5874a9 Reviewed-on: https://go-review.googlesource.com/59890 Reviewed-by: Rob Pike <r@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
64607dbd26
commit
2ac43d5be2
@ -1,6 +1,6 @@
|
||||
<!--{
|
||||
"Title": "The Go Programming Language Specification",
|
||||
"Subtitle": "Version of August 25, 2017",
|
||||
"Subtitle": "Version of August 30, 2017",
|
||||
"Path": "/ref/spec"
|
||||
}-->
|
||||
|
||||
@ -3147,8 +3147,8 @@ and the result of the slice operation is a slice with the same element type as t
|
||||
|
||||
<p>
|
||||
If the sliced operand of a valid slice expression is a <code>nil</code> slice, the result
|
||||
is a <code>nil</code> slice. Otherwise, the result shares its underlying array with the
|
||||
operand.
|
||||
is a <code>nil</code> slice. Otherwise, if the result is a slice, it shares its underlying
|
||||
array with the operand.
|
||||
</p>
|
||||
|
||||
<h4>Full slice expressions</h4>
|
||||
|
Loading…
Reference in New Issue
Block a user