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
{{ message }}
This repository has been archived by the owner on Dec 21, 2019. It is now read-only.
Checking the string is a very bad idea, and it is a much better idea to create exported error types, such as ErrorAlreadyAuthenticated that we can check for instead of relying on checking the string contents of err.Error(). err.Error() is for the user to read, not the machines.
Checking the string is a very bad idea, and it is a much better idea to create exported error types, such as
ErrorAlreadyAuthenticated
that we can check for instead of relying on checking the string contents of err.Error(). err.Error() is for the user to read, not the machines.http://dave.cheney.net/2016/04/27/dont-just-check-errors-handle-them-gracefully is a good read detailing how it's best to go about this. :-)
He is also involved in a package that follows the rules he suggests in the blogpost https://github.com/pkg/errors
The text was updated successfully, but these errors were encountered: