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
It's almost never right to write errors.Is(fs.ErrNotExist, err), but I still do it sometimes to much head-scratching 馃槄 It should be errors.Is(err, fs.ErrNotExist).
Would love it if there's way to warn when the first argument is an exported error value, especially one in another package... catch it much sooner.
Thanks for the consideration!
Also, many thanks for Staticcheck. It is a huge timesaver.
The text was updated successfully, but these errors were encountered:
It's almost never right to write
errors.Is(fs.ErrNotExist, err)
, but I still do it sometimes to much head-scratching 馃槄 It should beerrors.Is(err, fs.ErrNotExist)
.Would love it if there's way to warn when the first argument is an exported error value, especially one in another package... catch it much sooner.
Thanks for the consideration!
Also, many thanks for Staticcheck. It is a huge timesaver.
The text was updated successfully, but these errors were encountered: