mirror of
https://github.com/golang/go.git
synced 2025-05-05 23:53:05 +00:00
parent
e990ef52cc
commit
7c8425764e
@ -49,7 +49,7 @@ copy(a[i:], a[i+1:])
|
||||
a[len(a)-1] = nil // or the zero value of T
|
||||
a = a[:len(a)-1]
|
||||
// or, more simply:
|
||||
a[len(a)-1] = nil
|
||||
a[i] = nil
|
||||
a = append(a[:i], a[i+1:]...)
|
||||
```
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user