7 ms·
The whole GOPATH and directory magic is really bad and outdated. In almost every other language I can place my files wherever I want and write a build script.
by frik 11y ago
The whole GOPATH and directory magic is really bad and outdated. In almost every other language I can place my files wherever I want and write a build script.
I like everything else about Go and hope they remove that cruft from such a great language in version 2 or so. Go should learn from C/C++ in this regard.
- Nitramp 11y agoI see that the exact other way around. With other languages, every project decides on their weird local directory layout for no good reason at all, and then everyone has to write build scripts to keep things working. Learning from C++ builds seems like a cruel joke – not sure if trolling or not ;-)
- tumdum_ 11y agoAlthough I find build Go code with go tool very nice, it is in no way part of language specification. Just like in c you can build your own object files and/or archives and link them as you please. How go the tool does it is not the only possible way. See this example I've prepared on how to manually build go code: https://github.com/tumdum/go_build https://github.com/tumdum/go_build You can read more detailed explanation by Dave (author of alternative Go build system - gb) here: http://dave.cheney.net/2013/10/15/how-does-the-go-build-command-work http://dave.cheney.net/2013/10/15/how-does-the-go-build-comm...