Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't trigger superfluous logs #11

Merged
merged 2 commits into from
Jan 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions redoc.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,15 @@
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)

Check failure on line 96 in redoc.go

View workflow job for this annotation

GitHub Actions / test

Error return value of `w.Write` is not checked (errcheck)
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)

Check failure on line 103 in redoc.go

View workflow job for this annotation

GitHub Actions / test

Error return value of `w.Write` is not checked (errcheck)
}
}
}
Loading