fix: check error return value in test

This commit is contained in:
mehrdadbn9 2026-02-12 23:23:17 +03:30
parent d3bec39bd7
commit e755eb8ce6
2 changed files with 1 additions and 2 deletions

View File

@ -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:

View File

@ -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) {