Documentation
¶
Overview ¶
Package errdefer provides functions that call arbitrary functions if there is an error on function exit.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseContext ¶
func CloseContext[F CloseContextFunc](ctx context.Context, err *error, closeFn F) error
CloseContext calls fn with provided Context when *err is not nil. Returns an error returned from fn.
Types ¶
type CloseContextFunc ¶
Click to show internal directories.
Click to hide internal directories.