Documentation
¶
Index ¶
- func Chunk[T any](collection []T, size int) [][]T
- func Count[T comparable](collection []T, value T) (count int)
- func CountBy[T any](collection []T, okFunc func(item T) bool) (count int)
- func Filter[T any](collection []T, okFunc func(index int, value T) bool) []T
- func ForEach[T any](collection []T, anything func(index int, value T))
- func In[T comparable](v T, collection []T) bool
- func InBy[T any](v T, collection []T, equal func(src, target T) bool) bool
- func RemoveAll[T comparable](collection []T, value T) []T
- func Shuffle[T any](collection []T) []T
- func Uniq[T comparable](collection []T) []T
- func UniqBy[T any, U comparable](collection []T, uniqKey func(iterm T) U) []T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UniqBy ¶
func UniqBy[T any, U comparable](collection []T, uniqKey func(iterm T) U) []T
UniqBy 去重 通过uniqKey函数指定唯一条件
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.