5 ms·
For Slartibartfast I decided to give this project its own Workspace, with its own $GOPATH, and put the entire Workspace into git. This is not the recommended pr
by Arnor 13y ago
For Slartibartfast I decided to give this project its own Workspace, with its own $GOPATH, and put the entire Workspace into git.
This is not the recommended practice.
...
That's enough nitpicking. The take away that I get from reading this article is that "How to Write Go Code" (http://golang.org/doc/code.html http://golang.org/doc/code.html) needs improvement. The document was overhauled earlier this year to make it easier to understand. Apparently, it's not easy enough.
When I started with Go, I was doing something similar: each project got it's own directory and I had to update the $GOPATH environment variable for each. It was probably a month or so before I had the "Ah-hah" moment that I didn't need to do that. Looking over the (nicely revised) "How to Write Go Code", this clarification is still missing from the The GOPATH environment variable section.
The Go Tool page (http://golang.org/cmd/go/ http://golang.org/cmd/go/) is required reading if you're going to get anywhere with Go.
It would also be really nice to have a resource that demonstrated some Go design patterns (at least a factory...).