Skip to content

Commit

Permalink
Merge pull request #212 from henrybear327/go/1.23.0
Browse files Browse the repository at this point in the history
Bump go toolchain to 1.23.0
  • Loading branch information
ahrtr authored Aug 16, 2024
2 parents 0e3354c + d8230d5 commit ba8d7e3
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/static-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # v6.1.0
with:
version: v1.55.2
version: v1.60.1
- name: protoc
uses: arduino/setup-protoc@149f6c87b92550901b26acd1632e11c3662e381f # v1.3.0
with:
Expand Down
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.22.5
1.23.0
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module go.etcd.io/raft/v3

go 1.22
go 1.23

toolchain go1.22.6
toolchain go1.23.0

require (
github.com/cockroachdb/datadriven v1.0.2
Expand Down
6 changes: 3 additions & 3 deletions node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func TestNodeStepUnblock(t *testing.T) {
// TestNodePropose ensures that node.Propose sends the given proposal to the underlying raft.
func TestNodePropose(t *testing.T) {
var msgs []raftpb.Message
appendStep := func(r *raft, m raftpb.Message) error {
appendStep := func(_ *raft, m raftpb.Message) error {
t.Log(DescribeMessage(m, nil))
if m.Type == raftpb.MsgAppResp {
return nil // injected by (*raft).advance
Expand Down Expand Up @@ -240,7 +240,7 @@ func TestNodeReadIndexToOldLeader(t *testing.T) {
// to the underlying raft.
func TestNodeProposeConfig(t *testing.T) {
var msgs []raftpb.Message
appendStep := func(r *raft, m raftpb.Message) error {
appendStep := func(_ *raft, m raftpb.Message) error {
if m.Type == raftpb.MsgAppResp {
return nil // injected by (*raft).advance
}
Expand Down Expand Up @@ -386,7 +386,7 @@ func TestBlockProposal(t *testing.T) {
func TestNodeProposeWaitDropped(t *testing.T) {
var msgs []raftpb.Message
droppingMsg := []byte("test_dropping")
dropStep := func(r *raft, m raftpb.Message) error {
dropStep := func(_ *raft, m raftpb.Message) error {
if m.Type == raftpb.MsgProp && strings.Contains(m.String(), string(droppingMsg)) {
t.Logf("dropping message: %v", m.String())
return ErrProposalDropped
Expand Down
2 changes: 1 addition & 1 deletion raft.go
Original file line number Diff line number Diff line change
Expand Up @@ -2015,7 +2015,7 @@ func (r *raft) switchToConfig(cfg tracker.Config, trk tracker.ProgressMap) pb.Co
// Otherwise, still probe the newly added replicas; there's no reason to
// let them wait out a heartbeat interval (or the next incoming
// proposal).
r.trk.Visit(func(id uint64, pr *tracker.Progress) {
r.trk.Visit(func(id uint64, _ *tracker.Progress) {
if id == r.id {
return
}
Expand Down
2 changes: 1 addition & 1 deletion raft_paper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func testUpdateTermFromMessage(t *testing.T, state StateType) {
// Reference: section 5.1
func TestRejectStaleTermMessage(t *testing.T) {
called := false
fakeStep := func(r *raft, m pb.Message) error {
fakeStep := func(_ *raft, _ pb.Message) error {
called = true
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion raft_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1073,7 +1073,7 @@ func TestPastElectionTimeout(t *testing.T) {
// from old term and does not pass it to the actual stepX function.
func TestStepIgnoreOldTermMsg(t *testing.T) {
called := false
fakeStep := func(r *raft, m pb.Message) error {
fakeStep := func(_ *raft, _ pb.Message) error {
called = true
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion rawnode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ func TestRawNodeProposeAddDuplicateNode(t *testing.T) {
// to the underlying raft. It also ensures that ReadState can be read out.
func TestRawNodeReadIndex(t *testing.T) {
var msgs []pb.Message
appendStep := func(r *raft, m pb.Message) error {
appendStep := func(_ *raft, m pb.Message) error {
msgs = append(msgs, m)
return nil
}
Expand Down
4 changes: 2 additions & 2 deletions tools/mod/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module go.etcd.io/raft/tools/v3

go 1.22
go 1.23

toolchain go1.22.6
toolchain go1.23.0

require (
github.com/alexkohler/nakedret v1.0.0
Expand Down

0 comments on commit ba8d7e3

Please sign in to comment.