Upgrade golangci-lint, more linters

Introduces new linters, upgrade golangci-lint to version (v1.63.4)
This commit is contained in:
Joe Turki
2025-01-02 06:04:12 -06:00
parent 99dcc6b7bf
commit feeeebf251
147 changed files with 3842 additions and 2139 deletions

View File

@@ -20,7 +20,7 @@ import (
var api *webrtc.API //nolint
// Everything below is the Pion WebRTC API! Thanks for using it ❤️.
func doSignaling(w http.ResponseWriter, r *http.Request) {
func doSignaling(res http.ResponseWriter, req *http.Request) {
peerConnection, err := api.NewPeerConnection(webrtc.Configuration{})
if err != nil {
panic(err)
@@ -44,7 +44,7 @@ func doSignaling(w http.ResponseWriter, r *http.Request) {
})
var offer webrtc.SessionDescription
if err = json.NewDecoder(r.Body).Decode(&offer); err != nil {
if err = json.NewDecoder(req.Body).Decode(&offer); err != nil {
panic(err)
}
@@ -72,8 +72,8 @@ func doSignaling(w http.ResponseWriter, r *http.Request) {
panic(err)
}
w.Header().Set("Content-Type", "application/json")
if _, err := w.Write(response); err != nil {
res.Header().Set("Content-Type", "application/json")
if _, err := res.Write(response); err != nil {
panic(err)
}
}