Re:Go’ing Insane: Endless Error Handling
by noisem4ker on Tuesday September 14, 2021 @07:31AM
(#28523105)
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.
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.