Skip to content

Commit

Permalink
Docs: Wrong method reference and output in readme (#497)
Browse files Browse the repository at this point in the history
  • Loading branch information
ColeZia authored Jul 17, 2024
1 parent 1ca9c7b commit 6ade78c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ Supported helpers for slices:
- [DropRight](#dropright)
- [DropWhile](#dropwhile)
- [DropRightWhile](#droprightwhile)
- [DropByIndex](#DropByIndex)
- [Reject](#reject)
- [RejectMap](#rejectmap)
- [FilterReject](#filterreject)
Expand Down Expand Up @@ -775,8 +776,8 @@ l := lo.DropRightWhile([]string{"a", "aa", "aaa", "aa", "aa"}, func(val string)
Drops elements from a slice or array by the index. A negative index will drop elements from the end of the slice.

```go
l := lo.Drop([]int{0, 1, 2, 3, 4, 5}, 2, 4, -1)
// []int{2, 3}
l := lo.DropByIndex([]int{0, 1, 2, 3, 4, 5}, 2, 4, -1)
// []int{0, 1, 3}
```

[[play](https://go.dev/play/p/JswS7vXRJP2)]
Expand Down

0 comments on commit 6ade78c

Please sign in to comment.