Skip to content

Commit

Permalink
Fix linter errors
Browse files Browse the repository at this point in the history
golangci-lint upgrade to v1.56.2 added more checks

Relates to pion/.goassets#201
  • Loading branch information
Sean-Der committed Mar 16, 2024
1 parent 9adaf94 commit 2481f44
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion gstreamer-receive/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func gstreamerReceiveMain() {

// Set a handler for when a new remote track starts, this handler creates a gstreamer pipeline
// for the given codec
peerConnection.OnTrack(func(track *webrtc.TrackRemote, receiver *webrtc.RTPReceiver) {
peerConnection.OnTrack(func(track *webrtc.TrackRemote, _ *webrtc.RTPReceiver) {
// Send a PLI on an interval so that the publisher is pushing a keyframe every rtcpPLIInterval
go func() {
ticker := time.NewTicker(time.Second * 3)
Expand Down
2 changes: 1 addition & 1 deletion janus-gateway/streaming/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func main() {
fmt.Printf("Connection State has changed %s \n", connectionState.String())
})

peerConnection.OnTrack(func(track *webrtc.TrackRemote, receiver *webrtc.RTPReceiver) {
peerConnection.OnTrack(func(track *webrtc.TrackRemote, _ *webrtc.RTPReceiver) {
codec := track.Codec()
if codec.MimeType == "audio/opus" {
fmt.Println("Got Opus track, saving to disk as output.ogg")
Expand Down
2 changes: 1 addition & 1 deletion save-to-webm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func createWebRTCConn(saver *webmSaver) *webrtc.PeerConnection {

// Set a handler for when a new remote track starts, this handler copies inbound RTP packets,
// replaces the SSRC and sends them back
peerConnection.OnTrack(func(track *webrtc.TrackRemote, receiver *webrtc.RTPReceiver) {
peerConnection.OnTrack(func(track *webrtc.TrackRemote, _ *webrtc.RTPReceiver) {
// Send a PLI on an interval so that the publisher is pushing a keyframe every rtcpPLIInterval
go func() {
ticker := time.NewTicker(time.Second * 3)
Expand Down
2 changes: 1 addition & 1 deletion sip-over-websocket-to-webrtc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func main() {
panic(err)
}

pc.OnTrack(func(track *webrtc.TrackRemote, receiver *webrtc.RTPReceiver) {
pc.OnTrack(func(track *webrtc.TrackRemote, _ *webrtc.RTPReceiver) {
fmt.Println("Got Opus track, saving to disk as output.ogg")

for {
Expand Down
2 changes: 1 addition & 1 deletion sip-over-websocket-to-webrtc/softphone/invite.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func (softphone *Softphone) Invite(extension, offer string) {
nonce := regex.FindStringSubmatch(authenticateHeader)[1]

sipMessage.addProxyAuthorization(*softphone, nonce, extension, "INVITE").addCseq(softphone).newViaBranch()
softphone.request(sipMessage, func(msg string) bool {
softphone.request(sipMessage, func(string) bool {
return false
})

Expand Down
2 changes: 1 addition & 1 deletion sip-over-websocket-to-webrtc/softphone/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func (softphone *Softphone) register() {
nonce := regex.FindStringSubmatch(authenticateHeader)[1]

sipMessage.addAuthorization(*softphone, nonce, "REGISTER").addCseq(softphone).newViaBranch()
softphone.request(sipMessage, func(msg string) bool {
softphone.request(sipMessage, func(string) bool {
registeredFunc()

return false
Expand Down
2 changes: 1 addition & 1 deletion sip-over-websocket-to-webrtc/softphone/softphone.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type Softphone struct {
// NewSoftPhone ...
func NewSoftPhone(sipInfo SIPInfoResponse) *Softphone {
softphone := Softphone{}
softphone.OnInvite = func(inviteMessage SIPMessage) {}
softphone.OnInvite = func(SIPMessage) {}
softphone.fakeDomain = uuid.New().String() + ".invalid"
softphone.FakeEmail = uuid.New().String() + "@" + softphone.fakeDomain
softphone.fromTag = uuid.New().String()
Expand Down
2 changes: 1 addition & 1 deletion snapshot/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func signaling(w http.ResponseWriter, r *http.Request) {

// Set a handler for when a new remote track starts, this handler saves buffers to SampleBuilder
// so we can generate a snapshot
peerConnection.OnTrack(func(track *webrtc.TrackRemote, receiver *webrtc.RTPReceiver) {
peerConnection.OnTrack(func(track *webrtc.TrackRemote, _ *webrtc.RTPReceiver) {
// Send a PLI on an interval so that the publisher is pushing a keyframe every rtcpPLIInterval
go func() {
ticker := time.NewTicker(time.Second * 3)
Expand Down
2 changes: 1 addition & 1 deletion twitch/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func main() {
panic(err)
}

peerConnection.OnTrack(func(track *webrtc.TrackRemote, receiver *webrtc.RTPReceiver) {
peerConnection.OnTrack(func(track *webrtc.TrackRemote, _ *webrtc.RTPReceiver) {
// Send a PLI on an interval so that the publisher is pushing a keyframe every rtcpPLIInterval
go func() {
ticker := time.NewTicker(time.Second * 3)
Expand Down

0 comments on commit 2481f44

Please sign in to comment.