excutils¶
Exception-style error handling utilities for Go.
Overview¶
The excutils package (imported as exc) provides utilities for common error handling patterns including panic-on-error, error recovery, and safe error checking. While Go favors explicit error returns, these utilities can make certain patterns more concise.
Functions¶
Panic on Error: Must, MustResult, MustNotNil, ReturnNotNil Recovery: Try, Catch, RecoverWithValue Error Utilities: FirstErr, AllErr, ReturnAnyErr, IgnoreErr Retry: Retry, RetryWithResult