mirror of
https://github.com/golang/go.git
synced 2025-05-05 23:53:05 +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
|
||||
```go
|
||||
x, a = a[0], a[1:]
|
||||
x, a = a[len(a)-1:], a[:len(a)-1]
|
||||
```
|
||||
|
||||
#### Pop Back
|
||||
|
Loading…
x
Reference in New Issue
Block a user