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
A lot of people have looked at this kind of issue, and there is no clear consensus on what should be done in this area. So rather than try to provide this in a standard errors package, Go provides the tools that you need to implement it yourself. Or you can use a package like https://pkg.go.dev/github.com/pkg/errors.
Closing because as is this issue isn't going to lead to any changes. Please comment if you disagree. If you want to make changes here, the first step is to build a consensus.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
extend standard
errors
package to include more detail info field to make it more useful.What did you expect to see?
Maybe consider the following code, it just a suggestion.
When I handle error, I can define some error category firstly, then I can extend error info.
What did you see instead?
Reference only.
The text was updated successfully, but these errors were encountered: