diff --git a/context.go b/context.go index 696b35f2..92fb3704 100644 --- a/context.go +++ b/context.go @@ -1057,7 +1057,6 @@ func (c *Context) requestHeader(key string) string { // bodyAllowedForStatus is a copy of http.bodyAllowedForStatus non-exported function. // Uses http.StatusContinue constant for better code clarity. -// Upper bound 199 covers all 1xx informational status codes. func bodyAllowedForStatus(status int) bool { switch { case status >= http.StatusContinue && status < http.StatusOK: diff --git a/gin_test.go b/gin_test.go index 22d920bc..22d3b87c 100644 --- a/gin_test.go +++ b/gin_test.go @@ -1090,7 +1090,7 @@ func TestServeErrorWritten(t *testing.T) { router := New() router.Use(func(c *Context) { c.Writer.WriteHeader(http.StatusNotFound) - c.Writer.Write([]byte("custom error")) + _, _ = c.Writer.Write([]byte("custom error")) c.Next() }) router.NoRoute(func(c *Context) {