fixed linting issues

This commit is contained in:
ProtoTess
2025-10-30 02:03:34 +00:00
parent bf7c8d6d1b
commit 7816735dad
6 changed files with 138 additions and 10 deletions
+2 -2
View File
@@ -56,7 +56,7 @@ func (m *MockONVIFServer) handleRequest(w http.ResponseWriter, r *http.Request)
// Read request body
body := make([]byte, 0)
if r.Body != nil {
defer r.Body.Close()
defer func() { _ = r.Body.Close() }()
buf := make([]byte, 1024)
for {
n, err := r.Body.Read(buf)
@@ -99,7 +99,7 @@ func (m *MockONVIFServer) handleRequest(w http.ResponseWriter, r *http.Request)
w.Header().Set("Content-Type", "application/soap+xml")
w.WriteHeader(http.StatusOK)
w.Write([]byte(response))
_, _ = w.Write([]byte(response)) // Writing to ResponseWriter; error is handled by http package
}
func (m *MockONVIFServer) setupDefaultResponses() {