Closed hoanhan101 closed 6 years ago
yeah, I think this is an update to tooling or something, I did a
go get -u github.com/alecthomas/gometalinter
gometalinter --install
and got similar errors to what @hoanhan101 was seeing. Looks like all of the warnings are for fmt.Fprint
in the tests, so it should be easy enough to create a testing utility to check the error and make the linter happy
@here Technically that error is a "no-no" in Golang, since error values should always be checked. That being said, if you're confident that it's not an issue on a case by case basis, you can add //nolint: errcheck
to the line being called. I would highly recommend not disabling that test for the entire repo
If you want to see good examples of how to handle error checking in some non-Golang native functions, feel free to check out vapor-ware/ksync , specifically some of the protobuff handling might help.
As @MatthewHink and @edaniszewski suggested in #185, it seems like there are some tool versioning issues that causes gometalinter to fail. A temporary strategy is to disable errcheck to keep things moving.