3 ms·
1. 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 $GOP
by arghwhat 6y ago
1. 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.