3 ms·
Was it ever easy? I remember hours trying to figure out what to set GOPATH and GOHOME to and how to get “go get” to actually work. I can’t help but think go is
by yesimahuman 8y ago
Was it ever easy? I remember hours trying to figure out what to set GOPATH and GOHOME to and how to get “go get” to actually work. I can’t help but think go is a wonderful language with a poor package manager unfortunately woven directly into the language. Really makes npm feel wonderful in comparison.
- deleted 8y ago[deleted]
- anonfunction 8y agoI found it quite easy to set two environment variables and never had issues with `go get` either.
- nvarsj 8y ago"go get" is a disaster for any project of non trivial size. It was designed with the idea of a mono repo in mind - not a vast distributed network of independently evolving code repositories.
- sethammons 8y agoNever had any issues with that as soon as vendoring was an option. I routinely had/have three or more different non-trivial projects I was/am working on, and I dont recall ever having issues with go get. I started around maybe Go1.2. At first, I set GOPATH per project, but as soon as vendoring was a thing, one GOPATH to rule them all. Now, vendor updates to existing dependencies, there is something that has been a complete and utter disaster that hopefully gets better under the mod system.
- giancarlostoro 8y agoI cannot for the life of me understand why they don't make setting up all those variables part of the installer (in the case of Windows, and possibly Mac?) / first time setup process, or define some sane defaults that don't get in your way. I can't help but feel most people likely have a similar enough setup to how I have my environment variables configured at the minimum, why not automate that repetitiveness at the installer / default configuration level.
- ptman 8y agoThere is a default for GOPATH these days, it's ~/go on unix.
- kkarakk 8y agowasn't the case on mac when i dled golang 2 months ago
- sethammons 8y agoNot sure what your experience was. Release 1.8 started the default GOPATH in Feb 2017, which is a tad over two months ago. Maybe you somehow got an older version.