Updated SliceTricks (markdown)

Go101 2020-12-30 10:43:51 -05:00
parent 2ed870fe5e
commit 1265d4d8ab

@ -11,6 +11,12 @@ a = append(a, b...)
```go
b = make([]T, len(a))
copy(b, a)
// These two are often a little slower than the above one,
// but they would be more efficient if there are more
// elements to be appended to b.
b = append([]T(nil), a...)
b = append(a[:0:0], a...
```
#### Cut