News for hackers. Stuff that matters.
Re:Golang: Don't be afraid of makefiles by iainmerrick on Wednesday September 20, 2017 @12:10PM (#15295375)
Do most Go programmers put all their code under ~/go, or do they tend to set GOPATH on a project-by-project basis?
Re:Golang: Don't be afraid of makefiles by clra on Wednesday September 20, 2017 @12:16PM (#15295435)
Quite a few current Go programmers will have something set other than `~/go` because that default only came in very recently, but you'll probably find that almost everyone uses `~/go` or `$GOPATH`.

One thing that you learn quickly when starting Go is that fighting the language's idioms (even where they're questionable) isn't going to be a good time.

Re:Golang: Don't be afraid of makefiles by iainmerrick on Wednesday September 20, 2017 @12:21PM (#15295516)
Yeah, that's pretty much why I haven't learned Go. :)
Re:Golang: Don't be afraid of makefiles by oelmekki on Wednesday September 20, 2017 @12:54PM (#15295882)
Don't know about others, but since I run my projects in containers anyway, I'll usually use `direnv` on my host to set GOPATH to project directory, and then use the default GOPATH in go docker images (`/go`).

I could even do without direnv altogether, but I need it so that vim-go can report build errors on file saving.

Re:Golang: Don't be afraid of makefiles by bacongobbler on Wednesday September 20, 2017 @12:12PM (#15295394)
Most put it under ~/go. It's quick and easy.
Re:Golang: Don't be afraid of makefiles by foo101 on Wednesday September 20, 2017 @12:21PM (#15295512)
Most set the GOPATH. It's quick and easy.
Re:Golang: Don't be afraid of makefiles by petepete on Wednesday September 20, 2017 @03:22PM (#15297293)
I use virtualgo[0] so I can organise my work properly and not mix my own stuff up with loads of unrelated libraries

[0] https://github.com/getstream/vg