Mention that the append trick for copying fails on the empty slice

Juliusz Chroboczek 2016-11-01 19:58:40 +01:00
parent c7b68225bd
commit 70da14d4e9

@ -11,7 +11,7 @@ a = append(a, b...)
```go
b = make([]T, len(a))
copy(b, a)
// or
// or, if a is not the empty slice,
b = append([]T(nil), a...)
```