Documentation
¶
Index ¶
- func ForRange[T any](collection []T, iter func(item T, index int) error) error
- func ForRangeAll[T any](collection []T, iter func(item T, index int) error) error
- func ForRangeAllWithContext[T any](ctx context.Context, collection []T, ...) error
- func ForRangeWithContext[T any](ctx context.Context, collection []T, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ForRangeAll ¶
与 ForRange 类似,但在迭代时遇到错误不会中止、并在收集所有错误后返回。
入参:
- collection: 集合。
- iter: 迭代函数,接收集合中的元素和索引作为参数,返回错误。
出参:
- err: 错误。
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.