From c5220c6d20a8662f5c8c2213cd649f48299a94af Mon Sep 17 00:00:00 2001 From: Charles Billette Date: Wed, 27 Nov 2024 08:56:52 -0500 Subject: [PATCH] Refactor testSortFetcher to use pointer receiver --- rpc/sort_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpc/sort_test.go b/rpc/sort_test.go index 50c200f..4e95891 100644 --- a/rpc/sort_test.go +++ b/rpc/sort_test.go @@ -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 } @@ -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)