Skip to content

Commit

Permalink
go: Add info how to work with the new Go version
Browse files Browse the repository at this point in the history
Signed-off-by: Tatiana Nesterenko <[email protected]>
  • Loading branch information
tatiana-nspcc committed Feb 29, 2024
1 parent 542c04c commit 9079cde
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions go.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Working with Go language versions in project

Upon the release of a new version of Go, all repositories are updated
according to the following conditions:
* The minimum supported version of Go is set to two versions back from
the previous one. (For example, upon the release of Go 1.22, the minimum
version becomes 1.20.)
* All dependency packages are updated (sometimes, according to project
requirements, some deprecated package methods may be updated as well.)
* Go versions in GitHub workflows are also updated as follows:

1. Testing is performed on the last three versions of Go (in the example
mentioned above, this would be `[ '1.20', '1.21', '1.22' ]`).
2. For build and cover jobs, the latest version should be used (in the
example mentioned above, this would be 1.22).
3. If there are new versions of GitHub actions, they can also be updated
(for example, actions/checkout, actions/setup-go, actions/upload-artifact,
etc.).
4. The Go version for the linter equals the minimum supported version and
is usually taken from the `go.mod` file by specifying in the *.yml file:
```
with:
go-version-file: 'go.mod'
```

0 comments on commit 9079cde

Please sign in to comment.