Skip to content

Commit

Permalink
multi: Underscore unused func params.
Browse files Browse the repository at this point in the history
  • Loading branch information
jholdstock committed Feb 16, 2024
1 parent 1b9587c commit cf8f791
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions client/client_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2022-2023 The Decred developers
// Copyright (c) 2022-2024 The Decred developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.

Expand Down Expand Up @@ -72,7 +72,7 @@ func TestErrorDetails(t *testing.T) {
for testName, testData := range tests {
t.Run(testName, func(t *testing.T) {

testServer := httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) {
testServer := httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, _ *http.Request) {
res.WriteHeader(testData.respHTTPStatus)
_, err := res.Write(testData.respBodyBytes)
if err != nil {
Expand Down Expand Up @@ -156,7 +156,7 @@ func TestSignatureValidation(t *testing.T) {
for testName, testData := range tests {
t.Run(testName, func(t *testing.T) {

testServer := httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) {
testServer := httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, _ *http.Request) {
res.Header().Add("VSP-Server-Signature", testData.responseSig)
res.WriteHeader(http.StatusOK)
_, err := res.Write(emptyJSON)
Expand Down
4 changes: 2 additions & 2 deletions database/ticket_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2020-2023 The Decred developers
// Copyright (c) 2020-2024 The Decred developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.

Expand Down Expand Up @@ -191,7 +191,7 @@ func testFilterTickets(t *testing.T) {
}

// Expect all tickets returned.
retrieved, err := db.filterTickets(func(t *bolt.Bucket) bool {
retrieved, err := db.filterTickets(func(_ *bolt.Bucket) bool {
return true
})
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions database/upgrade_v3.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2021-2022 The Decred developers
// Copyright (c) 2021-2024 The Decred developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.

Expand All @@ -23,7 +23,7 @@ func ticketBucketUpgrade(db *bolt.DB, log slog.Logger) error {

// Count tickets so migration progress can be logged.
todo := 0
err := ticketBkt.ForEach(func(k, v []byte) error {
err := ticketBkt.ForEach(func(_, _ []byte) error {
todo++
return nil
})
Expand Down
4 changes: 2 additions & 2 deletions database/votechange.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2020-2021 The Decred developers
// Copyright (c) 2020-2024 The Decred developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.

Expand Down Expand Up @@ -41,7 +41,7 @@ func (vdb *VspDatabase) SaveVoteChange(ticketHash string, record VoteChangeRecor
var count int
newest := uint32(0)
oldest := uint32(math.MaxUint32)
err = bkt.ForEach(func(k, v []byte) error {
err = bkt.ForEach(func(k, _ []byte) error {
count++
key := bytesToUint32(k)
if key > newest {
Expand Down

0 comments on commit cf8f791

Please sign in to comment.