From f01e48edeaaf15c7814d2ff083c2708de70b34bd Mon Sep 17 00:00:00 2001 From: garrettladley Date: Tue, 22 Oct 2024 12:19:21 -0400 Subject: [PATCH] fix: lint --- internal/log/distributed.go | 2 +- internal/log/store_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/log/distributed.go b/internal/log/distributed.go index df12178..2b20065 100644 --- a/internal/log/distributed.go +++ b/internal/log/distributed.go @@ -432,7 +432,7 @@ func (s *StreamLayer) Accept() (net.Conn, error) { if err != nil { return nil, err } - if bytes.Compare([]byte{byte(RaftRPC)}, b) != 0 { + if !bytes.Equal([]byte{byte(RaftRPC)}, b) { return nil, fmt.Errorf("not a raft rpc") } if s.serverTLSConfig != nil { diff --git a/internal/log/store_test.go b/internal/log/store_test.go index 6dd428c..b72ccae 100644 --- a/internal/log/store_test.go +++ b/internal/log/store_test.go @@ -83,7 +83,7 @@ func TestStoreClose(t *testing.T) { err = s.Close() require.NoError(t, err) - f, afterSize, err := openFile(f.Name()) + _, afterSize, err := openFile(f.Name()) require.NoError(t, err) require.True(t, afterSize > beforeSize) }