Open nezorflame opened 5 years ago
I stand corrected - these warnings were produced by golangci-lint
, which uses multiple linters internally, including golint
.
These warnings were given by it.
Most of the changes are fixes for the warning of the errcheck
linter, which checks for the missing error checks in the code.
The warning given was Error return value of ... is not checked (errcheck)
There are still some warnings left, but they are mostly non-essential. If you'd like, I can post you the full output here.
Ready to be reviewed again.
Also I've added initial Go modules support since dependency management is pretty stable these days (we use it at my work in production without any issues).
This will also allow people to use go get
again for this binary starting with Go 1.12, because thanks to the modules, it'll use correct dependency versions.
Thanks for adding the modules @nezorflame! You might want to split the module patch and the style changes into two separate PRs for easier review. While I have no opinion about the style changes, I think the added modules are a great improvement.
@m0 @xeals as requested, I've separated style changes with the module PR (see #61).
So far it seems that all the essential golangci-lint
issues have been addressed.
This PR fixes few issues reported by
golangci-lint
lintersgolint
,govet
,gosec
,unused
anderrcheck
. Also adds preliminary support for Go modules.