mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-30 06:51:59 -08:00
update golangci-lint (#3149)
This commit is contained in:
parent
29f0ded9f1
commit
c7dbb951f3
17 changed files with 31 additions and 30 deletions
|
|
@ -307,7 +307,7 @@ func FuzzUnmarshal(f *testing.F) {
|
|||
f.Add(ca.enc)
|
||||
}
|
||||
|
||||
f.Fuzz(func(t *testing.T, b []byte) {
|
||||
f.Fuzz(func(_ *testing.T, b []byte) {
|
||||
Unmarshal(b) //nolint:errcheck
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -158,28 +158,28 @@ func TestChunkMarshal(t *testing.T) {
|
|||
}
|
||||
|
||||
func FuzzChunk0Read(f *testing.F) {
|
||||
f.Fuzz(func(t *testing.T, b []byte) {
|
||||
f.Fuzz(func(_ *testing.T, b []byte) {
|
||||
var chunk Chunk0
|
||||
chunk.Read(bytes.NewReader(b), 65536, false) //nolint:errcheck
|
||||
})
|
||||
}
|
||||
|
||||
func FuzzChunk1Read(f *testing.F) {
|
||||
f.Fuzz(func(t *testing.T, b []byte) {
|
||||
f.Fuzz(func(_ *testing.T, b []byte) {
|
||||
var chunk Chunk1
|
||||
chunk.Read(bytes.NewReader(b), 65536, false) //nolint:errcheck
|
||||
})
|
||||
}
|
||||
|
||||
func FuzzChunk2Read(f *testing.F) {
|
||||
f.Fuzz(func(t *testing.T, b []byte) {
|
||||
f.Fuzz(func(_ *testing.T, b []byte) {
|
||||
var chunk Chunk2
|
||||
chunk.Read(bytes.NewReader(b), 65536, false) //nolint:errcheck
|
||||
})
|
||||
}
|
||||
|
||||
func FuzzChunk3Read(f *testing.F) {
|
||||
f.Fuzz(func(t *testing.T, b []byte) {
|
||||
f.Fuzz(func(_ *testing.T, b []byte) {
|
||||
var chunk Chunk3
|
||||
chunk.Read(bytes.NewReader(b), 65536, true) //nolint:errcheck
|
||||
})
|
||||
|
|
|
|||
|
|
@ -297,7 +297,7 @@ func FuzzReader(f *testing.F) {
|
|||
0x01, 0x00, 0x00, 0x00, 0x88, 0x68, 0x76, 0x63,
|
||||
0x31, 0x01, 0x02, 0x03,
|
||||
})
|
||||
f.Fuzz(func(t *testing.T, b []byte) {
|
||||
f.Fuzz(func(_ *testing.T, b []byte) {
|
||||
bc := bytecounter.NewReader(bytes.NewReader(b))
|
||||
r := NewReader(bc, bc, nil)
|
||||
r.Read() //nolint:errcheck
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ func TestReader(t *testing.T) {
|
|||
t.Run(ca.name, func(t *testing.T) {
|
||||
var buf bytes.Buffer
|
||||
br := bytecounter.NewReader(&buf)
|
||||
r := NewReader(br, br, func(count uint32) error {
|
||||
r := NewReader(br, br, func(_ uint32) error {
|
||||
return nil
|
||||
})
|
||||
|
||||
|
|
@ -234,7 +234,7 @@ func TestReaderAcknowledge(t *testing.T) {
|
|||
|
||||
var buf bytes.Buffer
|
||||
bc := bytecounter.NewReader(&buf)
|
||||
r := NewReader(bc, bc, func(count uint32) error {
|
||||
r := NewReader(bc, bc, func(_ uint32) error {
|
||||
close(onAckCalled)
|
||||
return nil
|
||||
})
|
||||
|
|
@ -269,9 +269,9 @@ func TestReaderAcknowledge(t *testing.T) {
|
|||
}
|
||||
|
||||
func FuzzReader(f *testing.F) {
|
||||
f.Fuzz(func(t *testing.T, b []byte) {
|
||||
f.Fuzz(func(_ *testing.T, b []byte) {
|
||||
br := bytecounter.NewReader(bytes.NewReader(b))
|
||||
r := NewReader(br, br, func(count uint32) error {
|
||||
r := NewReader(br, br, func(_ uint32) error {
|
||||
return nil
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue