Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorGroup ¶
type ErrorGroup struct {
// contains filtered or unexported fields
}
An ErrorGroup waits for a collection of goroutines that return errors to finish. The main goroutine calls Go one or more times to execute a function that returns an error in a goroutine. Then it calls Wait to wait for all goroutines to finish and collect the results of each.
func (*ErrorGroup) Go ¶
func (eg *ErrorGroup) Go(action func() error)
Go runs the specified function in a goroutine.
func (*ErrorGroup) GoErrorSlice ¶
func (eg *ErrorGroup) GoErrorSlice(action func() []error)
GoErrorSlice runs a function that returns a slice of errors in a goroutine.
func (*ErrorGroup) Wait ¶
func (eg *ErrorGroup) Wait() []error
Wait waits for all functions run via Go to finish, and returns all of their errors.
Click to show internal directories.
Click to hide internal directories.