Skip to content

Commit

Permalink
Add nolint to examples
Browse files Browse the repository at this point in the history
Ignore err from Fprintf
  • Loading branch information
Sean-Der committed Jul 18, 2024
1 parent ce37669 commit 8780e68
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/broadcast/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ func httpSDPServer(port int) chan string {
sdpChan := make(chan string)
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
body, _ := io.ReadAll(r.Body)
fmt.Fprintf(w, "done")
fmt.Fprintf(w, "done") //nolint: errcheck
sdpChan <- string(body)
})

Expand Down
2 changes: 1 addition & 1 deletion examples/ortc-media/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ func httpSDPServer(port int) chan string {
sdpChan := make(chan string)
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
body, _ := io.ReadAll(r.Body)
fmt.Fprintf(w, "done")
fmt.Fprintf(w, "done") //nolint: errcheck
sdpChan <- string(body)
})

Expand Down
2 changes: 1 addition & 1 deletion examples/ortc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ func httpSDPServer(port int) chan string {
sdpChan := make(chan string)
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
body, _ := io.ReadAll(r.Body)
fmt.Fprintf(w, "done")
fmt.Fprintf(w, "done") //nolint: errcheck
sdpChan <- string(body)
})

Expand Down
2 changes: 1 addition & 1 deletion examples/whip-whep/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,5 +193,5 @@ func writeAnswer(w http.ResponseWriter, peerConnection *webrtc.PeerConnection, o
w.WriteHeader(http.StatusCreated)

// Write Answer with Candidates as HTTP Response
fmt.Fprint(w, peerConnection.LocalDescription().SDP)
fmt.Fprint(w, peerConnection.LocalDescription().SDP) //nolint: errcheck
}

0 comments on commit 8780e68

Please sign in to comment.