erris is a program for checking that errors are compared or type asserted using go1.13 errors.Is
and errors.As
functions.
go get -u github.com/romanyx/erris/cmd/erris
For basic usage, just give the package path of interest as the first argument:
erris github.com/romanyx/erris/testdata
Outputs:
github.com/romanyx/erris/testdata/main.go:14:5: use errors.Is to compare an error
github.com/romanyx/erris/testdata/main_test.go:11:14: use errors.As to type assert an error
To check all packages beneath the current directory:
erris ./...