From 51ee28292178e9c2b09e925c828f638ded86b591 Mon Sep 17 00:00:00 2001 From: Matthew Kuzminski Date: Thu, 2 Jan 2025 16:05:49 -0500 Subject: [PATCH] fix lint errors --- net_sink.go | 2 +- net_util_test.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/net_sink.go b/net_sink.go index 8f22cfc..52a68fe 100644 --- a/net_sink.go +++ b/net_sink.go @@ -283,7 +283,7 @@ func (s *netSink) run() { batchSize := settings.BatchSize isBatchEnabled := batchSize > 0 - batch := make([]bytes.Buffer, 0, batchSize+cap(s.outc)) // overallocate to consider draining all outc data. despite the exppanded allocation, batchSize is still used to determine if we send the batched stats + batch := make([]bytes.Buffer, 0, batchSize+cap(s.outc)) // overallocate to consider draining all outc data. despite the expanded allocation, batchSize is still used to determine if we send the batched stats sendBatch := false batchTimeout := time.Duration(settings.FlushIntervalS) * time.Second // todo: is there any need to use a new configuration for this? batchInterval := time.After(batchTimeout) diff --git a/net_util_test.go b/net_util_test.go index e3e3f55..b0110ca 100644 --- a/net_util_test.go +++ b/net_util_test.go @@ -347,7 +347,7 @@ func (m *errorCon) Write(b []byte) (int, error) { return len(b), nil } -func (m *errorCon) Read(b []byte) (int, error) { +func (m *errorCon) Read(_ []byte) (int, error) { return 0, io.EOF } @@ -355,7 +355,7 @@ func (m *errorCon) Close() error { return nil } -func (m *errorCon) SetWriteDeadline(t time.Time) error { +func (m *errorCon) SetWriteDeadline(_ time.Time) error { return nil } @@ -367,11 +367,11 @@ func (m *errorCon) RemoteAddr() net.Addr { return &net.TCPAddr{} } -func (m *errorCon) SetDeadline(t time.Time) error { +func (m *errorCon) SetDeadline(_ time.Time) error { return nil } -func (m *errorCon) SetReadDeadline(t time.Time) error { +func (m *errorCon) SetReadDeadline(_ time.Time) error { return nil }