From b072ff949f2ede8d6650c8f02dd9c0733409ead1 Mon Sep 17 00:00:00 2001 From: ramin Date: Wed, 27 Sep 2023 11:30:28 +0100 Subject: [PATCH] fix lint --- server/response.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/server/response.go b/server/response.go index 88e0efc..88e7352 100644 --- a/server/response.go +++ b/server/response.go @@ -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() { @@ -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 {