Skip to content

Commit 663dbb4

Browse files
Merge branch 'samber:master' into master
2 parents 1f0fa6e + df28bdd commit 663dbb4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ Supported helpers for slices:
105105
- [DropRight](#dropright)
106106
- [DropWhile](#dropwhile)
107107
- [DropRightWhile](#droprightwhile)
108+
- [DropByIndex](#DropByIndex)
108109
- [Reject](#reject)
109110
- [RejectMap](#rejectmap)
110111
- [FilterReject](#filterreject)
@@ -775,8 +776,8 @@ l := lo.DropRightWhile([]string{"a", "aa", "aaa", "aa", "aa"}, func(val string)
775776
Drops elements from a slice or array by the index. A negative index will drop elements from the end of the slice.
776777

777778
```go
778-
l := lo.Drop([]int{0, 1, 2, 3, 4, 5}, 2, 4, -1)
779-
// []int{2, 3}
779+
l := lo.DropByIndex([]int{0, 1, 2, 3, 4, 5}, 2, 4, -1)
780+
// []int{0, 1, 3}
780781
```
781782

782783
[[play](https://go.dev/play/p/JswS7vXRJP2)]
@@ -1649,7 +1650,7 @@ err, duration := lo.Duration1(func() error {
16491650
// an error
16501651
// 3s
16511652

1652-
err, duration := lo.Duration3(func() (string, int, error) {
1653+
str, nbr, err, duration := lo.Duration3(func() (string, int, error) {
16531654
// very long job
16541655
return "hello", 42, nil
16551656
})

0 commit comments

Comments
 (0)