Documentation
¶
Index ¶
- func ContainsInInt32Slice(s []int32, e int32) bool
- func ContainsInIntSlice(s []int, e int) bool
- func ContainsInStringSlice(s []string, e string) bool
- func ContainsInStringSliceIgnoreCase(s []string, e string) bool
- func GetComplementaryAndIntersection(oldIds []int, newIds []int) (needToDeleteIds, needToCreateIds, needToUpdateIds []int)
- func IndexOfStringSlice(s []string, e string) int
- func IntersectionIntSlice(i1 []int, i2 []int) []int
- func RemoveDuplicateFromIntSlice(s []int) []int
- func RemoveDuplicateFromStringSlice(s []string) []string
- func RemoveFromStringSlice(s []string, e string) []string
- func RemoveValueFromIntSlice(a []int, rmVal int) []int
- func SplitIntoChunk[T any](items []T, chunkSize int) (chunks [][]T)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsInInt32Slice ¶
func ContainsInIntSlice ¶
func ContainsInStringSlice ¶
func GetComplementaryAndIntersection ¶
func GetComplementaryAndIntersection(oldIds []int, newIds []int) (needToDeleteIds, needToCreateIds, needToUpdateIds []int)
GetComplementaryAndIntersection 取 oldIds 不在 newIds 的id,取 newIds 不在 oldIds 的id,取交集
func IndexOfStringSlice ¶
IndexOfStringSlice returns the index of the first occurrence of the specified element in this list, or -1 if this list does not contain the element.
func IntersectionIntSlice ¶
IntersectionIntSlice 用于获取两个 Int 类型切片的交集
func RemoveDuplicateFromIntSlice ¶
RemoveDuplicateFromIntSlice removes duplicate elements of the integer slice. 去重
func RemoveDuplicateFromStringSlice ¶
RemoveDuplicateFromStringSlice removes duplicate elements of the string slice.
func RemoveFromStringSlice ¶
RemoveFromStringSlice removes the first occurrence of the specified element from this list, if it is present. If the list does not contain the element, it is unchanged.
func RemoveValueFromIntSlice ¶
删除 int 类型切片中的元素
func SplitIntoChunk ¶
SplitIntoChunk 会将 items 切片切割成块,每一块的大小上限是 chunkSize
Types ¶
This section is empty.