Documentation ¶
Overview ¶
Package errutil provides common error types and utilities.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotImplemented = xerrors.New("not implemented")
ErrNotImplemented is returned when feature is currently not implemented.
Functions ¶
func AssertionFailure ¶
AssertionFailure is used for an error resulting from the failure of an expected invariant.
func CheckClose ¶
CheckClose closes c. If an error occurs it will be written to the error pointer errp, if it doesn't already reference an error. This is intended to allow you to properly check errors when defering a close call. In this case the error pointer should be the address of a named error return.
func UnexpectedType ¶
func UnexpectedType(t interface{}) error
UnexpectedType builds an error for an unexpected type, typically in a type switch.
func UnhandledCase ¶
func UnhandledCase(v interface{}) error
UnhandledCase builds an error for an unexpected value in a switch.
Types ¶
Click to show internal directories.
Click to hide internal directories.