Most of the golang tools like golint, gopkgs etc are installed like libraries with go get
for instance, go get -v github.com/golang/lint/golint
or go get -v github.com/tpng/gopkgs
. I wonder why these are not just binaries that run through the source code, like go fmt
, for example?
Since I work on multiple Go projects at the same time, I prefer having different GOPATH
for different projects and so I am having to install these tools into every single project so that I can lint or have auto completions.
Am I doing something wrong or is there a way to install these tools globally and then just use them in multiple projects? How do people handling multiple projects manage this?
EDIT:
I am not asking about vendoring of libraries or about projects using different versions of Go at the same time. My question is about having to install tools like lint and gopkgs into every GOPATH, why they were designed to be treated like libraries instead of being provided as a global binary like go fmt
which then could've been used in multiple projects, just like we use go fmt