Hacker News new | ask | show | jobs
by lclarkmichalek 2896 days ago
I mean, the point of modules is to get rid of vendor. And if you were building outside of GOPATH previously, you were likely broken (or using a specialized build tool that handled this for you). The second one is because it's a cache. Storing them there isn't a breaking change, it's just a bit odd
1 comments

> you were likely broken (or using a specialized build tool that handled this for you)

Or you're using the isolated-GOPATH trick.

  $ mkdir -p .gopath/src/github.com/foo
  $ ln -s ../../../.. .gopath/src/github.com/foo/bar 
  $ GOPATH=$PWD/.gopath go install github.com/foo/bar
For example, this is one of my Go projects where you can unpack the release tarball anywhere and `make && make install` just works: https://github.com/sapcc/swift-http-import