Awesome
erris
erris is a program for checking that errors are compared or type asserted using go1.13 errors.Is
and errors.As
functions.
Install
go get -u github.com/romanyx/erris/cmd/erris
Use
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 ./...