Skip to content
Snippets Groups Projects
Unverified Commit eb33a4d9 authored by HonkingGoose's avatar HonkingGoose Committed by GitHub
Browse files

docs: improve Go documentation (#7820)

* use 1.'s for ordered list

* fix whitespace in ordered list

* use active voice

* capitalize SemVer

* Remove fluff word

* use active voice

* update paragraph, needs further work

* explain how to pin to a specific Go lang version

* change Go version from 1.14.2 -> 1.14.12

* strip patch level from Go version, explain why
parent 16e5e468
No related branches found
No related tags found
No related merge requests found
...@@ -9,26 +9,26 @@ Renovate supports upgrading dependencies in `go.mod` files and their accompanyin ...@@ -9,26 +9,26 @@ Renovate supports upgrading dependencies in `go.mod` files and their accompanyin
## How It Works ## How It Works
1. Renovate will search each repository for any `go.mod` files 1. Renovate searches in each repository for any `go.mod` files
2. Existing dependencies will be extracted from `require` statements 1. Renovate extracts existing dependencies from `require` statements
3. 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 1. Renovate resolves the dependency's source repository and checks for SemVer tags if found. Otherwise commits and `v0.0.0-....` syntax will be used
4. If an update was found, Renovate will update `go.mod` to the new value 1. If Renovate finds an update, Renovate will update `go.mod` to the new value
5. Renovate will run `go get` to update the `go.sum` files 1. Renovate runs `go get` to update the `go.sum` files
6. If the user has enabled the option `gomodTidy` in the [`postUpdateOptions`](https://docs.renovatebot.com/configuration-options/#postupdateoptions) array, then Renovate will run `go mod tidy`, which itself can update `go.mod` and `go.sum` 1. If the user has enabled the option `gomodTidy` in the [`postUpdateOptions`](https://docs.renovatebot.com/configuration-options/#postupdateoptions) array, then Renovate runs `go mod tidy`, which itself can update `go.mod` and `go.sum`
7. `go mod vendor` will be run if vendored modules have been detected 1. `go mod vendor` is run if vendored modules are detected
8. A PR will be created with `go.mod`,`go.sum`, and any updated vendored files updated in the one commit 1. A PR will be created with `go.mod`,`go.sum`, and any updated vendored files updated in the one commit
9. 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 1. 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 ## Enabling Go Modules Updating
Go Modules updating is on by default in Renovate Bot. Renovate updates Go Modules by default.
To install Renovate Bot itself, either enable the [Renovate App](https://github.com/apps/renovate) on GitHub, or check out [Renovate OSS](https://github.com/renovatebot/renovate) for self-hosted. To install Renovate Bot itself, either enable the [Renovate App](https://github.com/apps/renovate) on GitHub, or check out [Renovate OSS](https://github.com/renovatebot/renovate) for self-hosted.
## Technical Details ## Technical Details
#### Module Tidying #### Module Tidying
Go Modules tidying is not enabled by default, and so is opt-in via the [`postUpdateOptions`](https://docs.renovatebot.com/configuration-options/#postupdateoptions) config option. Go Modules tidying is not enabled by default, and is opt-in via the [`postUpdateOptions`](https://docs.renovatebot.com/configuration-options/#postupdateoptions) config option.
The reason for this is that a `go mod tidy` command may make changes to `go.mod` and `go.sum` that are completely unrelated to the updated module(s) in the PR, and so may be confusing to some users. The reason for this is that a `go mod tidy` command may make changes to `go.mod` and `go.sum` that are completely unrelated to the updated module(s) in the PR, and so may be confusing to some users.
#### Module Vendoring #### Module Vendoring
...@@ -38,5 +38,8 @@ Renovate will commit all files changed within the `vendor/` folder. ...@@ -38,5 +38,8 @@ Renovate will commit all files changed within the `vendor/` folder.
#### Go binary version #### Go binary version
Currently, Renovate will try to keep up with the very latest version of `go`, and it is not configurable. By default, Renovate will keep up with the very latest version of `go`.
It is planned though to support a configurable version of `go` per-repository soon.
You can "pin" the `go` version that Renovate uses.
Say you want Renovate to use Go version 1.14, you can do this by adding `go 1.14` to your `go.mod` file.
We do not support pinning Go versions to a specific patch level, so you cannot use `go 1.14.12`, but you can use `go 1.14` in your `go.mod` file.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment