3 ms·
Not since 2019: https://blog.golang.org/using-go-modules https://blog.golang.org/using-go-modules The project has to opt into it, which appears to be the case
by oauea 6y ago
Not since 2019: https://blog.golang.org/using-go-modules https://blog.golang.org/using-go-modules
The project has to opt into it, which appears to be the case here since there is a `go.mod` file. Are you using a modern version of Go?
- axaxs 6y agoIf you opt into modules, modules get stored in GOPATH. If you don't use modules...source gets downloaded into GOPATH. If GOPATH is unset, it uses ~/go.
- arghwhat 6y ago1. If you opt into modules, $GOMODCACHE is used for go mod downloads. It defaults to $GOPATH/pkg/mod. 2. If you don't use modules, $GOPATH is used. 3. If $GOPATH isn't set, it defaults to ~/go.
- tsimionescu 6y agoActually, modules are still downloaded to a global location, they are not copied locally to your project by default.
- oauea 6y agoWell yes, but most languages have some kind of cache in the home folder.
- tsimionescu 6y agoSo yes, go does "assume that you have a directory in $HOME that is for it's own personal use?"