You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The former has not been maintained since 2021.
The latter is not a complete replacement of the former, because the former adds stack traces to errors. However, we are not making use of stack traces in errors.
Should we replace the former with the latter?
The text was updated successfully, but these errors were encountered:
Shameless plug: you can also switch it to drop-in replacement gitlab.com/tozd/go/errors. It fixes many issues, is maintained, and supports modern Go's error patterns (sentinel errors, %w formatting, joined errors, etc.). It also provides some nice utility functions and structured details so that it is easy to extract dynamic data out of errors (instead of trying to get them out of formatted strings). Has improved error formatting and JSON marshaling of errors. It is interoperable with other errors packages and does not require a dependency on it to extract data (e.g., stack trace) from errors.
From the list above, it provides structural errors and unified error formatting (even for errors which come from other errors packages/approaches so it works well in large codebases with mixed errors dependencies). Because it supports structural errors (called details) it is also easy to add metrics to errors. And JSON support helps with logging storage.
The former has not been maintained since 2021.
The latter is not a complete replacement of the former, because the former adds stack traces to errors. However, we are not making use of stack traces in errors.
Should we replace the former with the latter?
The text was updated successfully, but these errors were encountered: