mirror of
https://github.com/golang/go.git
synced 2025-05-05 15:43:04 +00:00
Updated SliceTricks (markdown)
parent
dc8f077d00
commit
3ba038cc99
@ -13,6 +13,8 @@ b = make([]T, len(a))
|
|||||||
copy(b, a)
|
copy(b, a)
|
||||||
// or
|
// or
|
||||||
b = append([]T(nil), a...)
|
b = append([]T(nil), a...)
|
||||||
|
// or
|
||||||
|
b = append(a[:0:0], a...) // See https://github.com/go101/go101/wiki
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Cut
|
#### Cut
|
||||||
|
Loading…
x
Reference in New Issue
Block a user