Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTeardown = errors.New("teardown failed")
ErrTeardown is wrapped into every error Run returns, so a caller that tolerates another error in the same chain (for example the cancellation that aborted a startup) can still tell that a cleanup fn failed.
Functions ¶
func OnlyCancelled ¶ added in v0.112.11
OnlyCancelled reports whether err is nil, or contains context.Canceled without ErrTeardown. It does not establish where the cancellation came from or exclude other errors in the same tree. A caller that joins Run's error to the cancellation it requested uses it in place of errors.Is, which would accept the tree even when a cleanup fn failed.
Types ¶
Click to show internal directories.
Click to hide internal directories.