fix(subsonic): check fmt.Fprintf return (errcheck lint)
This commit is contained in:
@@ -86,7 +86,7 @@ func writeJSONP(w http.ResponseWriter, body any, callback string) {
|
||||
return
|
||||
}
|
||||
w.Header().Set("Content-Type", "application/javascript; charset=utf-8")
|
||||
fmt.Fprintf(w, "%s(", callback)
|
||||
_, _ = fmt.Fprintf(w, "%s(", callback)
|
||||
_ = json.NewEncoder(w).Encode(map[string]any{"subsonic-response": body})
|
||||
_, _ = io.WriteString(w, ")")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user