diff --git a/redoc.go b/redoc.go index f70de33..dade337 100644 --- a/redoc.go +++ b/redoc.go @@ -92,15 +92,15 @@ func (r Redoc) Handler() http.HandlerFunc { header := w.Header() if strings.HasSuffix(req.URL.Path, r.SpecPath) { header.Set("Content-Type", "application/json") - _, _ = w.Write(spec) - w.WriteHeader(200) + w.WriteHeader(http.StatusOK) + w.Write(spec) return } if docsPath == "" || docsPath == req.URL.Path { header.Set("Content-Type", "text/html") - _, _ = w.Write(data) - w.WriteHeader(200) + w.WriteHeader(http.StatusOK) + w.Write(data) } } }