Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Capture ¶
Capture is a wrapper function which can be used to capture errors from closing via a defer. An example:
func Example() (err error) {
f, _ := os.Open(...)
defer errors.Capture(&err, f.Close)()
...
return
Doing this will result in the error from the f.Close() call being put in the error via a ptr, if the error is not nil
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.