enable errcheck

This commit is contained in:
aler9
2023-08-13 15:21:13 +02:00
committed by Alessandro Ros
parent 08ab6c6ed2
commit 18ddae4c50
63 changed files with 344 additions and 203 deletions

View File

@@ -10,10 +10,12 @@ import (
func TestByteCounter(t *testing.T) {
bc := New(bytes.NewBuffer(nil), nil, nil)
bc.Write([]byte{0x01, 0x02, 0x03, 0x04})
_, err := bc.Write([]byte{0x01, 0x02, 0x03, 0x04})
require.NoError(t, err)
buf := make([]byte, 2)
bc.Read(buf)
_, err = bc.Read(buf)
require.NoError(t, err)
require.Equal(t, uint64(4), bc.BytesSent())
require.Equal(t, uint64(2), bc.BytesReceived())