Go Wiki: Go Modules
This wiki page serves as a usage and troubleshooting guide.
- For tutorial blog posts, see Using Go Modules.
- For a technical reference, see the Go Modules Reference (under development).
Go has included support for versioned modules as proposed here since 1.11. The initial prototype vgo was announced in February 2018. In July 2018, versioned modules landed in the main Go repository.
Since Go 1.14, module support is considered ready for production use, and all users are encouraged to migrate to modules from other dependency management systems. If you are unable to migrate due to a problem in the Go toolchain, please ensure that the problem has an open issue filed. (If the issue is not on the Go1.16 milestone, please comment on why it prevents you from migrating so it can be prioritized appropriately). You can also provide an experience report for more detailed feedback.
Recent Changes
Go 1.16
See the Go 1.16 release notes for details.
- Module mode (
GO111MODULE=on) is the default in all cases - Commands no longer modify
go.mod/go.sumby default (-mod=readonly) go install pkg@versionis the recommended way to globally install packages / executablesretractis available ingo.mod
Go 1.15
See the Go 1.15 release notes for details.