Documentation ¶
Index ¶
- func BatchAsyncExec[T any](wg *sync.WaitGroup, list []T, batchsize int, f func(start, end int) error) error
- func BatchExec[T any](list []T, batchsize int, f func(start, end int) error) error
- func BufAppend[S ~string | ~[]byte](buf *[]byte, s S)
- func Concat[T any](a, b []T) []T
- func ConcatUniq[T comparable](a, b []T) []T
- func JoinInts[T generics.Integer](ints []T) string
- func JoinStrings(strs []string) string
- func Uniq[T comparable](v []T) []T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BatchAsyncExec ¶
func BatchAsyncExec[T any](wg *sync.WaitGroup, list []T, batchsize int, f func(start, end int) error) error
分段异步处理 每次处理batchsize的数量
func ConcatUniq ¶
func ConcatUniq[T comparable](a, b []T) []T
拼接两个slice后去重
比如 [1,2,3] + [2,3,4] -> [1,2,3,4]
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.