Skip to content

Commit e4a8126

Browse files
authored
Update to Go 1.24 (#4512)
- Use go 1.24 for CI where 1.23 was used - Update golangci-lint (and removes a deprecated linter, tenv) - Remove packaging for Ubuntu 20.04 (no longer supported by GitHub Actions)
2 parents bb45146 + 6130874 commit e4a8126

File tree

11 files changed

+11
-13
lines changed

11 files changed

+11
-13
lines changed

.github/workflows/assets.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Install Go
1717
uses: actions/setup-go@v5
1818
with:
19-
go-version: '1.23.x'
19+
go-version: '1.24.x'
2020
- name: Install
2121
run: |
2222
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH

.github/workflows/cli.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Install Go
1717
uses: actions/setup-go@v5
1818
with:
19-
go-version: '1.23.x'
19+
go-version: '1.24.x'
2020
- name: Install
2121
run: |
2222
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH

.github/workflows/go-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
steps:
2222
- uses: actions/setup-go@v5
2323
with:
24-
go-version: "1.23.x"
24+
go-version: "1.24.x"
2525
- uses: actions/checkout@v4
2626
- name: golangci-lint
2727
uses: golangci/golangci-lint-action@v5

.github/workflows/go-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
matrix:
2222
include:
2323
# Recommended version
24-
- go-version: '1.23.x'
24+
- go-version: '1.24.x'
2525
couchdb-version: '3.3.3'
2626
# More exotic version
2727
- go-version: '1.21.x'

.github/workflows/release.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Install Go
2323
uses: actions/setup-go@v5
2424
with:
25-
go-version: "1.23.x"
25+
go-version: "1.24.x"
2626
- name: Checkout code
2727
uses: actions/checkout@v4
2828
- name: Build the binaries
@@ -71,7 +71,6 @@ jobs:
7171
"debian:10",
7272
"debian:11",
7373
"debian:12",
74-
"ubuntu:20.04",
7574
"ubuntu:22.04",
7675
"ubuntu:24.04",
7776
]

.github/workflows/system-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- name: Install Go
4242
uses: actions/setup-go@v5
4343
with:
44-
go-version: '1.23.x'
44+
go-version: '1.24.x'
4545
- name: Install Ruby
4646
uses: ruby/setup-ruby@v1
4747
with:

.golangci.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ linters:
3535
- govet
3636
- misspell
3737
- nolintlint
38-
- tenv
3938
- unconvert
4039
- unused
4140
- whitespace

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ lint: scripts/golangci-lint
2626
.PHONY: lint
2727

2828
scripts/golangci-lint: Makefile
29-
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ./scripts v1.63.1
29+
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ./scripts v1.64.5
3030

3131
## jslint: enforce a consistent code style for Js code
3232
jslint: scripts/node_modules

docs/docker.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ docker run -it --rm --name cozy-stack \
4141
--workdir /app \
4242
-v $(pwd):/app \
4343
-v $(pwd):/go/bin \
44-
golang:1.23 \
44+
golang:1.24 \
4545
go get -v github.com/cozy/cozy-stack
4646
```
4747

pkg/i18n/i18n.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func TranslatorHTML(locale, contextName string) func(key string, vars ...interfa
5151
// Translate translates the given key on the specified locale.
5252
func Translate(key, locale, contextName string, vars ...interface{}) string {
5353
if po, ok := translations[contextName+"/"+locale]; ok {
54-
translated := po.Get(key) //nolint:govet // key is given by the stack and is safe
54+
translated := po.Get(key)
5555
if translated != key && translated != "" {
5656
if len(vars) > 0 {
5757
return fmt.Sprintf(translated, vars...)
@@ -60,7 +60,7 @@ func Translate(key, locale, contextName string, vars ...interface{}) string {
6060
}
6161
}
6262
if po, ok := translations[locale]; ok {
63-
translated := po.Get(key) //nolint:govet // key is given by the stack and is safe
63+
translated := po.Get(key)
6464
if translated != key && translated != "" {
6565
if len(vars) > 0 {
6666
return fmt.Sprintf(translated, vars...)

scripts/packaging/installrequirements.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -euo pipefail
44

5-
GOVERSION="${GOVERSION:-1.23.0}"
5+
GOVERSION="${GOVERSION:-1.24.0}"
66

77
cd "$(dirname $0)/../.."
88
if [ -f debian/changelog ]; then

0 commit comments

Comments
 (0)