Skip to content

Commit

Permalink
Refactor testSortFetcher to use pointer receiver
Browse files Browse the repository at this point in the history
  • Loading branch information
billettc committed Nov 27, 2024
1 parent 2d88fb9 commit c5220c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rpc/sort_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
type testSortFetcher struct {
}

func (t testSortFetcher) fetchSortValue(ctx context.Context, client *rollClient) (sortValue uint64, err error) {
func (t *testSortFetcher) fetchSortValue(ctx context.Context, client *rollClient) (sortValue uint64, err error) {
return client.sortValue, nil
}

Expand All @@ -28,7 +28,7 @@ func TestClientsSort(t *testing.T) {
clients.Add(&rollClient{name: "c.a", sortValue: 103})
clients.Add(&rollClient{name: "c.b", sortValue: 104})

fetcher := testSortFetcher{}
fetcher := &testSortFetcher{}

err := Sort(context.Background(), clients, fetcher, SortDirectionDescending)
require.NoError(t, err)
Expand Down

0 comments on commit c5220c6

Please sign in to comment.