Location of Downloaded Go Modules
When you enable Go modules and build your program, the required packages are downloaded but may not be visible in the traditional $GOPATH/src/ or $GOPATH/src/mod directories. So, where are these downloaded modules stored?
Answer: $GOPATH/pkg/mod
For Go version 1.11, the downloaded modules are stored in the $GOPATH/pkg/mod directory. This is used as the module cache, where the downloaded packages are placed for subsequent reuse. This allows for faster build times and ensures that all dependencies are resolved and up-to-date.
The above is the detailed content of Where Are Downloaded Go Modules Stored?. For more information, please follow other related articles on the PHP Chinese website!