Skip to content

Commit

Permalink
Fix golangci-lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
stv0g committed May 5, 2023
1 parent 1a23b62 commit 62977fe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions codecs/av1_packet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ package codecs

import (
"errors"
"fmt"
"reflect"
"testing"

Expand Down Expand Up @@ -52,7 +51,7 @@ func TestAV1_Unmarshal_Error(t *testing.T) {
av1Pkt := &AV1Packet{}

if _, err := av1Pkt.Unmarshal(test.input); !errors.Is(err, test.expectedError) {
t.Fatal(fmt.Sprintf("Expected error(%s) but got (%s)", test.expectedError, err))
t.Fatalf("Expected error(%s) but got (%s)", test.expectedError, err)
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions codecs/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ func min(a, b int) int {
// audioDepacketizer is a mixin for audio codec depacketizers
type audioDepacketizer struct{}

func (d *audioDepacketizer) IsPartitionTail(marker bool, payload []byte) bool {
func (d *audioDepacketizer) IsPartitionTail(_ bool, _ []byte) bool {
return true
}

func (d *audioDepacketizer) IsPartitionHead(payload []byte) bool {
func (d *audioDepacketizer) IsPartitionHead(_ []byte) bool {
return true
}

// videoDepacketizer is a mixin for video codec depacketizers
type videoDepacketizer struct{}

func (d *videoDepacketizer) IsPartitionTail(marker bool, payload []byte) bool {
func (d *videoDepacketizer) IsPartitionTail(marker bool, _ []byte) bool {
return marker
}
2 changes: 1 addition & 1 deletion codecs/opus_packet.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package codecs
type OpusPayloader struct{}

// Payload fragments an Opus packet across one or more byte arrays
func (p *OpusPayloader) Payload(mtu uint16, payload []byte) [][]byte {
func (p *OpusPayloader) Payload(_ uint16, payload []byte) [][]byte {
if payload == nil {
return [][]byte{}
}
Expand Down

0 comments on commit 62977fe

Please sign in to comment.