Skip to content

Commit

Permalink
server: fix staticcheck issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jsec committed Dec 9, 2024
1 parent 393b660 commit 403e389
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions internal/server/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ func (s *Server) badRequest(w http.ResponseWriter, msg string) {
s.httpError(w, http.StatusBadRequest, msg)
}

func (s *Server) notFound(w http.ResponseWriter, msg string) {
s.httpError(w, http.StatusNotFound, msg)
}

func (s *Server) httpError(w http.ResponseWriter, code int, msg string) {
response := response{
Error: msg,
Expand All @@ -30,5 +26,5 @@ func (s *Server) httpError(w http.ResponseWriter, code int, msg string) {

w.Header().Set("content-type", "application/json")
w.WriteHeader(code)
w.Write(res)
_, _ = w.Write(res)
}

0 comments on commit 403e389

Please sign in to comment.