4 ms·
I use GOPATH=$HOME. All the code (Go and other languages) lives under $HOME/src.
by acln 10y ago
I use GOPATH=$HOME. All the code (Go and other languages) lives under $HOME/src.
- bluejekyll 10y agoAnd what about .git? And roots compatible with what other Devs expect?
- deleted 10y ago[deleted]
- 4ad 10y agoWhat about git?
- bluejekyll 10y agoI was curious about how this recommendation effects other Devs and the .git and other similar paths in the Dev workflow. That is, is the root of each go project effected?
- 4ad 10y agoSorry, I don't understand the question. I also set GOPATH=$HOME, and all my source code (not only Go) lives in $HOME/src, and I do use git for both Go and non-Go projects (so they have a .git directory in $HOME/src/what/ever/.git), and there's no problem. Why would there be one?
- nishs 10y agoRunning GOPATH=$HOME go get github.com/foo/bar would download the package to: $HOME/src/github.com/foo/bar So $HOME will not have .git.
- Merovius 10y agoI don't see any problems with .git. Most go packages use git anyway, it would be pretty amazing if go tooling would break if you have a .git directory anywhere. Re the other question: If you don't run a go command with a path name, it doesn't matter what the directory structure is. I have tons of non-go projects in my GOPATH and build them with the usual tools. No issues.