renovate/lib/modules/versioning/go-mod-directive
Rhys Arkins 2902d17637
fix(gomod): go.mod directive should not bump by default (#28475)
2024-04-17 10:59:13 +00:00
..
index.spec.ts fix(gomod): go.mod directive should not bump by default (#28475) 2024-04-17 10:59:13 +00:00
index.ts fix(gomod): go.mod directive should not bump by default (#28475) 2024-04-17 10:59:13 +00:00
readme.md feat(gomod): directive versioning (#19453) 2022-12-17 08:12:57 +01:00

readme.md

This versioning is used exclusively for the go directive in go.mod files.

It ensures that a value like 1.16 is treated like ^1.16 and not ~1.16.

By default this will mean that the go directive in go.mod files won't get upgraded to any new Go version, such as 1.19. If you wish to upgrade this value every time there's a new minor Go release, configure rangeStrategy to be "bump" like so:

{
  "packageRules": [
    {
      "matchDatasources": ["golang-version"],
      "rangeStrategy": "bump"
    }
  ]
}