doc: update for release v2.2.8

This commit is contained in:
dudaodong committed 2023-12-11 15:30:33 +08:00
1 parent c5297ec329
commit 96320069f4
9 files changed
+29 -19

No files matched your search

+1 -1
View File
@@ -1232,7 +1232,7 @@ func Partition[T any](slice []T, predicates ...func(item T) bool) [][]T {
}
// Random get a random item of slice, return idx=-1 when slice is empty
// Play: todo
// Play: https://go.dev/play/p/UzpGQptWppw
func Random[T any](slice []T) (val T, idx int) {
if len(slice) == 0 {
return val, -1