Documentation ¶
Index ¶
- func All[M ~map[K]V, K comparable, V any](m M) ([]K, []V)
- func BatchAsyncExec[M ~map[K]V, K comparable, V any](wg *sync.WaitGroup, m M, batchsize int, fn func(target M) error) error
- func BatchExec[M ~map[K]V, K comparable, V any](m M, batchsize int, fn func(target M) error) error
- func Func[M ~map[K]V, K comparable, V any](m M, f func(k K, v V))
- func Keys[M ~map[K]V, K comparable, V any](m M) []K
- func Values[M ~map[K]V, K comparable, V any](m M) []V
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func All ¶
func All[M ~map[K]V, K comparable, V any](m M) ([]K, []V)
func BatchAsyncExec ¶
func BatchAsyncExec[M ~map[K]V, K comparable, V any](wg *sync.WaitGroup, m M, batchsize int, fn func(target M) error) error
wg will wait inside the function
func BatchExec ¶
func BatchExec[M ~map[K]V, K comparable, V any](m M, batchsize int, fn func(target M) error) error
遍历map并且分批执行指定函数 每次返回batchsize个元素
func Func ¶
func Func[M ~map[K]V, K comparable, V any](m M, f func(k K, v V))
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.