Hacker News new | past | comments | ask | show | jobs | submit login

This is pretty much what we've been doing at DO, but we were dealing with GOPATH manipulation to achieve it. By having `GOPATH="third_party/:docode/"`, `go get` pulls packages into `third_party` automatically, and `go install` finds our binaries in `docode/src/services/foosvc/cmd/foosvcd`.

Migrating to use `vendor/` instead of `third_party/` will be trivial, and not having to modify GOPATH will be nice.

Having a GO_VENDOR=1 env var on top of the `go get -vendor` feature flag would be nice, so that the feature works with minimal disruption.




How do you handle a custom GOPATH like that when the current repository needs to be in there too? We've tried manually symlinking the repo dir into the custom '$GOPATH/src/github.com/user/repo' dir, but it feels really hacky.


You can separate multiple paths with a colon.


More specifically, with os.PathListSeparator. (colon on Unix, semicolon on Windows and \x00 on Plan 9)


We just keep all our go code in one repo.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: