Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
maciuszek committed Jan 2, 2025
1 parent a46cf32 commit 51ee282
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion net_sink.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions net_util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,15 +347,15 @@ 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
}

func (m *errorCon) Close() error {
return nil
}

func (m *errorCon) SetWriteDeadline(t time.Time) error {
func (m *errorCon) SetWriteDeadline(_ time.Time) error {
return nil
}

Expand All @@ -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
}

Expand Down

0 comments on commit 51ee282

Please sign in to comment.