async

package
v0.0.0-...-6b3b694 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Errable

func Errable(fn func() error) <-chan error

func FlatMap

func FlatMap[T any, D any](src []T, concurrencyLimit int, f func(T) ([]D, error)) ([]D, error)

func Map

func Map[T any, D any](src []T, concurrencyLimit int, f func(T) (D, error)) ([]D, error)

func WaitAll

func WaitAll(chans ...<-chan error) error

WaitAll waits for all the given errables to finish, and returns the last error occurred in all errables, if any.

Types

type Errors

type Errors struct {
	Errs []error
}

func (Errors) Error

func (e Errors) Error() any

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL