Version: v0.10.1 Latest Latest

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

Go to latest
Published: Jan 10, 2019 License: Apache-2.0 Imports: 1 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


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.

Source Files

Jump to

Keyboard shortcuts

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