errs2

package
v0.14.7 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2019 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Collect

func Collect(errch chan error, duration time.Duration) error

Collect returns first error from channel and all errors that happen within duration

func IgnoreCanceled

func IgnoreCanceled(err error) error

IgnoreCanceled returns nil, when the operation was about canceling.

func IsFunc

func IsFunc(err error, is func(err error) bool) bool

IsFunc checks whether any of the underlying errors matches the func

Types

type Group added in v0.10.2

type Group struct {
	// contains filtered or unexported fields
}

Group is a collection of goroutines working on subtasks that are part of the same overall task.

func (*Group) Go added in v0.10.2

func (group *Group) Go(f func() error)

Go calls the given function in a new goroutine.

func (*Group) Wait added in v0.10.2

func (group *Group) Wait() []error

Wait blocks until all function calls from the Go method have returned, then returns all errors (if any) from them.

Jump to

Keyboard shortcuts

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