Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update supported go versions to 1.22+1.23 #659

Merged
merged 1 commit into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/go-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:
strategy:
matrix:
go-version:
- "1.21"
- "1.22"
- "1.23"

container:
image: golang:${{ matrix.go-version }}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/reddit/baseplate.go

go 1.21
go 1.22

require (
github.com/Shopify/sarama v1.29.1
Expand Down
1 change: 0 additions & 1 deletion internal/admin/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ var expectedMetrics = []string{
"go_godebug_non_default_behavior_http2client_events_total",
"go_godebug_non_default_behavior_http2server_events_total",
"go_godebug_non_default_behavior_installgoroot_events_total",
"go_godebug_non_default_behavior_jstmpllitinterp_events_total",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems to be no longer in go 1.23.

"go_godebug_non_default_behavior_multipartmaxheaders_events_total",
"go_godebug_non_default_behavior_multipartmaxparts_events_total",
"go_godebug_non_default_behavior_multipathtcp_events_total",
Expand Down
4 changes: 2 additions & 2 deletions tracing/hooks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package tracing_test

import (
"context"
"fmt"
"errors"
"reflect"
"testing"

Expand All @@ -19,7 +19,7 @@ type CallContainer struct {
func (c *CallContainer) AddCall(call string, fail bool) error {
c.Calls = append(c.Calls, call)
if fail {
return fmt.Errorf(call)
return errors.New(call)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does go vet call this out now?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the main point I think is the dynamic string part, so a string literal would still work, and if you use something like fmt.Errorf("%s", call) that likely also works.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which I think makes sense, as there's a possibility call contains some format verbs and then fmt.Errorf(call) would cause an error.

}
return nil
}
Expand Down
Loading