<story><title>Golang: Don&apos;t be afraid of makefiles</title><url>https://sohlich.github.io/post/go_makefile/</url></story><parent_chain><item><author>rgbrenner</author><text>There&amp;#x27;s another good use for Makefiles with go.&lt;p&gt;Gopath is one of the dumbest ideas I&amp;#x27;ve seen. Multiple large projects under the same directory? Who thought that was a good idea. (and yes, I know you can create subdirectories, and mix all your packages together to create a giant mess.)&lt;p&gt;So I separate the projects into their own directories.. and use a Makefile to set gopath and run the go commands.&lt;p&gt;Still trying to figure out why golang tried to be innovative here.. What couldn&amp;#x27;t they use cwd like every other compiler I&amp;#x27;ve ever seen?</text></item></parent_chain><comment><author>leggomylibro</author><text>Yeah, that is what turned me off of Golang. It was kind of a &amp;quot;straw that broke the camel&amp;#x27;s back&amp;quot; thing, though. Go is just an EXTREMELY opinionated language, and if you don&amp;#x27;t like that then you won&amp;#x27;t like it. The Best Way to do everything is decided for you ahead of time, which irks me because it isn&amp;#x27;t always true. But I can see the frustration it grew from when I use a language like Ruby, which has a half-dozen nearly-identical ways to accomplish most simple tasks.&lt;p&gt;Anyways, you could muck around with symlinks and crap, but come on. If I can&amp;#x27;t simply mkdir&amp;#x2F;vim&amp;#x2F;compile&amp;#x2F;run a &amp;#x27;hello world&amp;#x27; program, there&amp;#x27;s probably something wrong with the language.</text></comment>
<story><title>Golang: Don&apos;t be afraid of makefiles</title><url>https://sohlich.github.io/post/go_makefile/</url></story><parent_chain><item><author>rgbrenner</author><text>There&amp;#x27;s another good use for Makefiles with go.&lt;p&gt;Gopath is one of the dumbest ideas I&amp;#x27;ve seen. Multiple large projects under the same directory? Who thought that was a good idea. (and yes, I know you can create subdirectories, and mix all your packages together to create a giant mess.)&lt;p&gt;So I separate the projects into their own directories.. and use a Makefile to set gopath and run the go commands.&lt;p&gt;Still trying to figure out why golang tried to be innovative here.. What couldn&amp;#x27;t they use cwd like every other compiler I&amp;#x27;ve ever seen?</text></item></parent_chain><comment><author>iainmerrick</author><text>I seem to recall hearing that was finally being fixed, but a quick search of the docs suggests not. I think it&amp;#x27;s just GOROOT (another bizarre idea) rather than GOPATH that&amp;#x27;s no longer strictly required in the latest version of Go.&lt;p&gt;I agree with you, I don&amp;#x27;t understand why GOROOT couldn&amp;#x27;t just be the directory containing the compiler, and GOPATH couldn&amp;#x27;t just be the current directory. Maybe make me put some kind of workspace file there to identify it as the project root, that&amp;#x27;d be fine.</text></comment>