1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-03-01 00:35:28 +08:00

doc: fix doc error

This commit is contained in:
dudaodong
2023-03-16 10:36:06 +08:00
parent 5e66bc6227
commit d0ffc61842
3 changed files with 290 additions and 294 deletions
+1 -2
View File
@@ -1002,10 +1002,9 @@ func main() {
}
```
### <span id="ForEachWithBreak">ForEachWithBreak</span>
<p>Iterates over elements of slice and invokes function for each element, when iteratee return true, will break the for each loop.</p>
<p>Iterates over elements of slice and invokes function for each element, when iteratee return false, will break the for each loop.</p>
<b>Signature:</b>
-3
View File
@@ -542,7 +542,6 @@ func main() {
}
```
### <span id="Drop">Drop</span>
<p>从切片的头部删除n个元素。</p>
@@ -1004,7 +1003,6 @@ func main() {
}
```
### <span id="ForEachWithBreak">ForEachWithBreak</span>
<p>遍历切片的元素并为每个元素调用iteratee函数,当iteratee函数返回false时,终止遍历。</p>
@@ -1043,7 +1041,6 @@ func main() {
}
```
### <span id="GroupBy">GroupBy</span>
<p>迭代切片的元素,每个元素将按条件分组,返回两个切片</p>
+1 -1
View File
@@ -422,7 +422,7 @@ func ForEach[T any](slice []T, iteratee func(index int, item T)) {
}
// ForEachWithBreak iterates over elements of slice and invokes function for each element,
// when iteratee return true, will break the for each loop.
// when iteratee return false, will break the for each loop.
func ForEachWithBreak[T any](slice []T, iteratee func(index int, item T) bool) {
loop:
for i, v := range slice {