MSP-8995 up golangci-lint config and fix lint issues

This commit is contained in:
bogdanmezencev committed 2026-11-18 19:52:40 +03:00
1 parent 80d9286498
commit 5191f45076
9 files changed
+62 -31

No files matched your search

+6 -1
View File
@@ -3,6 +3,7 @@ package httperrors
import (
"net/http"
"github.com/txix-open/isp-kit/errors"
"github.com/txix-open/isp-kit/json"
)
@@ -33,7 +34,11 @@ func (e *HttpError) WriteError(w http.ResponseWriter) error {
"errorMessage": e.userMessage,
"details": e.details,
}
return json.NewEncoder(w).Encode(data)
err := json.NewEncoder(w).Encode(data)
if err != nil {
return errors.WithMessage(err, "encode HTTP error response")
}
return nil
}
func (e *HttpError) WithDetails(details ...any) {