mirror of
https://github.com/golang/go
synced 2024-11-21 18:04:40 -07:00
doc/articles/slices_usage_and_internals: fix typo
Fixes #3753. R=golang-dev, adg CC=golang-dev https://golang.org/cl/6304097
This commit is contained in:
parent
d4c4f4d2c4
commit
5d2cfc2faa
@ -243,7 +243,7 @@ slice itself) of a re-slice modifies the elements of the original slice:
|
|||||||
d := []byte{'r', 'o', 'a', 'd'}
|
d := []byte{'r', 'o', 'a', 'd'}
|
||||||
e := d[2:]
|
e := d[2:]
|
||||||
// e == []byte{'a', 'd'}
|
// e == []byte{'a', 'd'}
|
||||||
e[1] == 'm'
|
e[1] = 'm'
|
||||||
// e == []byte{'a', 'm'}
|
// e == []byte{'a', 'm'}
|
||||||
// d == []byte{'r', 'o', 'a', 'm'}
|
// d == []byte{'r', 'o', 'a', 'm'}
|
||||||
</pre>
|
</pre>
|
||||||
|
Loading…
Reference in New Issue
Block a user