2 ms·
Great to see this getting standardized! I maintain an error package that lets users use structured types for errors and error codes [1]. It is critical to be a
by gregwebs 7y ago
Great to see this getting standardized!
I maintain an error package that lets users use structured types for errors and error codes [1]. It is critical to be able to wrap errors without information loss. I used one standard, a Causer interface, but I will be switching to Unwrap.
I see complaints about stacktraces here in the comments. I recommend always using pkg/errors or some error package with stack traces.
[1] https://github.com/pingcap/errcode https://github.com/pingcap/errcode