Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ramin committed Sep 27, 2023
1 parent d828639 commit b072ff9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions server/response.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ func (r *Response) AddError(err Error) *Response {

func (r *Response) Empty() {
r.Writer.WriteHeader(http.StatusAccepted)
r.Writer.Write(nil)
_, err := r.Writer.Write(nil)
if err != nil {
log.Error(err)
}
}

func (r *Response) NotFound() {
Expand Down Expand Up @@ -109,7 +112,10 @@ func (r *Response) respond(header int) {
r.Writer.Header().Set("Content-Type", "application/json")

r.Writer.WriteHeader(header)
r.Writer.Write(data)
_, err = r.Writer.Write(data)
if err != nil {
log.Error(err)
}
}

type Status struct {
Expand Down

0 comments on commit b072ff9

Please sign in to comment.