|
|
|
|
|
by virulent
4036 days ago
|
|
I have a similar feeling. I don't really like GOPATH, but I'm trying to come to terms with it. Your Go "project" goes in $GOPATH/src, i.e. your git repo would be in $GOPATH/src/github.com/user/repo If you have your main pkg in $REPO/service, then you can build like so: go build github.com/user/repo/service (this can be ran from anywhere as it uses $GOPATH) If you need to add a dependency, use: go get github.com/.... and go get will add it to $GOPATH/src/ which you can then import. |
|
Thanks!