Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Hook ¶
Hook a callback to be called as a potential fix to an error.
@cb: return true if the fix was successful, return false, if it failed.
func HookAny ¶ added in v1.2.0
HookAny is like Hook, but will use the error.Is method.
@cb: return true if the fix was successful, return false, if it failed.
func Try ¶
Try to fix an error if a hook can fix it.
@err will be updated with the new error, or with nil if fixed successfully.
note: if @err is already nil, this method will be ignored.
func TryOnce ¶ added in v1.0.3
TryOnce will try to fix only one error.
If a different error comes up, this method will stop trying, instead of trying to fix the next error.
@err will be updated with the new error, or with nil if fixed successfully.
note: if @err is already nil, this method will be ignored.
Types ¶
This section is empty.