Skip to content

Commit 8780e68

Browse files
committed
Add nolint to examples
Ignore err from Fprintf
1 parent ce37669 commit 8780e68

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

examples/broadcast/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ func httpSDPServer(port int) chan string {
226226
sdpChan := make(chan string)
227227
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
228228
body, _ := io.ReadAll(r.Body)
229-
fmt.Fprintf(w, "done")
229+
fmt.Fprintf(w, "done") //nolint: errcheck
230230
sdpChan <- string(body)
231231
})
232232

examples/ortc-media/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ func httpSDPServer(port int) chan string {
297297
sdpChan := make(chan string)
298298
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
299299
body, _ := io.ReadAll(r.Body)
300-
fmt.Fprintf(w, "done")
300+
fmt.Fprintf(w, "done") //nolint: errcheck
301301
sdpChan <- string(body)
302302
})
303303

examples/ortc/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ func httpSDPServer(port int) chan string {
244244
sdpChan := make(chan string)
245245
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
246246
body, _ := io.ReadAll(r.Body)
247-
fmt.Fprintf(w, "done")
247+
fmt.Fprintf(w, "done") //nolint: errcheck
248248
sdpChan <- string(body)
249249
})
250250

examples/whip-whep/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,5 +193,5 @@ func writeAnswer(w http.ResponseWriter, peerConnection *webrtc.PeerConnection, o
193193
w.WriteHeader(http.StatusCreated)
194194

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

0 commit comments

Comments
 (0)