4 ms·
In my experience, errors returned by the standard library and recent third party packages are fairly well discernible, although not in all cases. Note that you
by noisem4ker 5y ago
In my experience, errors returned by the standard library and recent third party packages are fairly well discernible, although not in all cases.
Note that you don't need custom error types, just exported Error instances. These were in use even before wrapping was introduced with Go 1.13 (2019); one had to compare or type-assert directly instead of unwrapping.