Documentation
¶
Overview ¶
Package errtmp provides a way to mark errors as temporary.
Example ¶
err := errbase.New("error")
err = Wrap(err, true)
temporary := Is(err)
fmt.Println(temporary)
Output: true
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Is ¶
Is returns true if an error is temporary, false otherwise.
By default, an error is considered temporary. This is the opposite of the usual convention where an error that does not implement a Temporary() bool method is considered not temporary. To explicitly mark an error as not temporary, wrap it with Wrap and the value false.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.