3 ms·
That's not true. You're supposed to add a workspace path to GOPATH, and keep all your packages in there. You can use multiple workspaces (add more directories t
by enneff 14y ago
That's not true. You're supposed to add a workspace path to GOPATH, and keep all your packages in there. You can use multiple workspaces (add more directories to GOPATH), but that's not a requirement.
This screencast might help: http://www.youtube.com/watch?v=XCsL89YtqCs http://www.youtube.com/watch?v=XCsL89YtqCs
- Mooby 14y agoYou started your post by claiming it wasn't true, but you proceeded to say that yes, it is in fact true. As it is stated in the screencast, a programmer needs to add the workspace to $GOPATH to be able to build the source. That means that for each project being developed in Go, you need to add the path to that project to $GOPATH to be able to build it. That is a very poor way to do develop software.
- agentS 14y agoOr, you could have multiple projects in a single workspace... Personally, I keep 2; one for external packages, and one for ones I'm working on.
- enneff 14y agoNo, that's not true. You just keep all your projects in a single workspace (as I do), and their namespaces keep them separate.
- Mooby 14y agoYou repeat yourself yet again. How exactly can you claim with a straight face that a workspace doesn't need to be referred to in $GOPATH, and then proceed to claim that you only need to set $GOPATH to a directory which contains those workspaces? You start off your post by claiming it's not true, but then you repeat exactly what I said. Are you joking?