Automated Dependency Updates for Go Modules
Renovate supports upgrading dependencies in
go.mod files and their accompanying
How It Works
- Renovate will search each repository for any
- Existing dependencies will be extracted from
- Renovate will resolve the dependency's source repository and check for semver tags if found. Otherwise commits and
v0.0.0-....syntax will be used.
- If an update was found, Renovate will update
go.modto the new value
- Renovate will run
go getto update the
- If the user has enabled the option
postUpdateOptionsarray, then Renovate will run
go mod tidy, which itself can update
go mod vendorwill be run if vendored modules have been detected.
- A PR will be created with
go.sum, and any updated vendored files updated in the one commit
- If the source repository has either a "changelog" file or uses GitHub releases, then Release Notes for each version will be embedded in the generated PR.
Enabling Go Modules Updating
Go Modules tidying is not enabled by default, and so is opt-in via the
postUpdateOptions config option. The reason for this is that a
go mod tidy command may make changes to
go.sum that are completely unrelated to the updated module(s) in the PR, and so may be confusing to some users.
Vendoring of Go Modules is done automatically if
vendor/modules.txt is present. Renovate will commit all files changed within the
Go binary version
Currently, Renovate will try to keep up with the very latest version of
go, and it is not configurable. It is planned though to support a configurable version of
go per-repository soon.