Skip to content

Commit 234b6c4

Browse files
phbnftommyd450
authored andcommitted
go update to 1.23 (google#3733)
* go update to 1.23 * update changelog * update README.md * update golangci-lint * fix golangci-lint
1 parent 4d64189 commit 234b6c4

File tree

8 files changed

+11
-11
lines changed

8 files changed

+11
-11
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@4696ba8babb6127d732c3c6dde519db15edab9ea # v6.5.1
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@4696ba8babb6127d732c3c6dde519db15edab9ea # v6.5.1
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@4696ba8babb6127d732c3c6dde519db15edab9ea # v6.5.1
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+

README.md

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

7474
To build and test Trillian you need:
7575

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

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

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module github.com/google/trillian
22

33
go 1.23.0
44

5-
toolchain go1.23.6
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)