Skip to content

Commit 1f8ca96

Browse files
authored
go update to 1.23 (#3733)
* go update to 1.23 * update changelog * update README.md * update golangci-lint * fix golangci-lint
1 parent c2124a9 commit 1f8ca96

File tree

9 files changed

+13
-12
lines changed

9 files changed

+13
-12
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ jobs:
1919
- name: golangci-lint
2020
uses: golangci/golangci-lint-action@051d91933864810ecd5e2ea2cfd98f6a5bca5347 # v6.3.2
2121
with:
22-
version: v1.55.1
22+
version: v1.61.0
2323
args: --timeout=8m

.github/workflows/test_crdb.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727

2828
- uses: golangci/golangci-lint-action@051d91933864810ecd5e2ea2cfd98f6a5bca5347 # v6.3.2
2929
with:
30-
version: 'v1.55.1'
30+
version: 'v1.61.0'
3131
args: ./storage/crdb
3232

3333
unit-test:

.github/workflows/test_pgdb.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727

2828
- uses: golangci/golangci-lint-action@051d91933864810ecd5e2ea2cfd98f6a5bca5347 # v6.3.2
2929
with:
30-
version: 'v1.55.1'
30+
version: 'v1.61.0'
3131
args: ./storage/postgresql
3232

3333
integration-and-unit-tests:
@@ -68,4 +68,4 @@ jobs:
6868

6969
- name: Run unit tests
7070
run: go test -v ./storage/postgresql/... ./quota/postgresqlqm/...
71-
71+

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
* Add `--election_system` parameter to allow selection of the election system by @osmman in https://github.com/google/trillian/pull/3721
66
* Add Kubernetes-based leader election system by @osmman in https://github.com/google/trillian/pull/3721
7+
* Bump go to 1.23
78

89
## v1.7.1
910

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ The current state of feature implementation is recorded in the
8181

8282
To build and test Trillian you need:
8383

84-
- Go 1.22 or later (go 1.22 matches cloudbuild, and is preferred for developers
84+
- Go 1.23 or later (go 1.23 matches cloudbuild, and is preferred for developers
8585
that will be submitting PRs to this project).
8686

8787
To run many of the tests (and production deployment) you need:

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
module github.com/google/trillian
22

3-
go 1.22.0
3+
go 1.23.0
44

5-
toolchain go1.22.10
5+
toolchain go1.23.4
66

77
require (
88
bitbucket.org/creachadair/shell v0.0.8

monitoring/testonly/metrics.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func TestCounter(t *testing.T, factory monitoring.MetricFactory) {
7171
// Use a different set of label values
7272
// Metrics with different valued label values, are distinct
7373
// This test is only applicable when a Metric has labels
74-
if test.labelVals != nil && len(test.labelVals) >= 1 {
74+
if len(test.labelVals) >= 1 {
7575
altLabels := make([]string, len(test.labelVals))
7676
copy(altLabels, test.labelVals)
7777
altLabels[0] = "alt-val1"
@@ -151,7 +151,7 @@ func TestGauge(t *testing.T, factory monitoring.MetricFactory) {
151151
// Use a different set of label values
152152
// Metrics with different valued label values, are distinct
153153
// This test is only applicable when a Metric has labels
154-
if test.labelVals != nil && len(test.labelVals) >= 1 {
154+
if len(test.labelVals) >= 1 {
155155
altLabels := make([]string, len(test.labelVals))
156156
copy(altLabels, test.labelVals)
157157
altLabels[0] = "alt-val1"
@@ -223,7 +223,7 @@ func TestHistogram(t *testing.T, factory monitoring.MetricFactory) {
223223
// Use a different set of label values
224224
// Metrics with different valued label values, are distinct
225225
// This test is only applicable when a Metric has labels
226-
if test.labelVals != nil && len(test.labelVals) >= 1 {
226+
if len(test.labelVals) >= 1 {
227227
altLabels := make([]string, len(test.labelVals))
228228
copy(altLabels, test.labelVals)
229229
altLabels[0] = "alt-val1"

server/errors/errors.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
// (such as canonical SQL errors), else err is returned unmodified.
2626
func WrapError(err error) error {
2727
if err == sql.ErrNoRows {
28-
return status.Errorf(codes.NotFound, err.Error())
28+
return status.Error(codes.NotFound, err.Error())
2929
}
3030

3131
return err

server/errors/errors_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func TestWrapError(t *testing.T) {
4242
},
4343
{
4444
err: sql.ErrNoRows,
45-
wantErr: status.Errorf(codes.NotFound, sql.ErrNoRows.Error()),
45+
wantErr: status.Error(codes.NotFound, sql.ErrNoRows.Error()),
4646
},
4747
}
4848
for _, test := range tests {

0 commit comments

Comments
 (0)