mirror of
https://github.com/golang/go.git
synced 2025-05-06 08:03:03 +00:00
Fixed slice "pop" example. Someone had it matching "shift"
parent
2f832bd690
commit
60b270c294
@ -86,7 +86,7 @@ a = append(a[:i], append(b, a[i:]...)...)
|
|||||||
|
|
||||||
#### Pop
|
#### Pop
|
||||||
```go
|
```go
|
||||||
x, a = a[0], a[1:]
|
x, a = a[len(a)-1:], a[:len(a)-1]
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Pop Back
|
#### Pop Back
|
||||||
|
Loading…
x
Reference in New Issue
Block a user