connecterr is Go static analyzer for development with connect-go.
This analyser warns when an error is returned without being wrapped in connect.NewError.
// NG (warn by analyzer)
return nil, err
// OK (no warning)
return nil, connect.NewError(connect.CodeInternal, err)
It can be installed with the go install
command.
go install github.com/ry023/connecterr/cmd/[email protected]
Diagnostics can be performed by specifying this analyser binary as -vettool
when go vet
.
go vet -vettool=$(which connecterr) ./...