Open mozhata opened 2 years ago
gin should do something to save the return line
return
when met an error we use to lines to deal with it
var err error if err != nil{ c.Status(http.StatusInternalServerError) return }
It will be cool to use return c.Status(http.StatusInternalServerError) or provide some alike method to support this
return c.Status(http.StatusInternalServerError)
@easonlin404
Please review
https://github.com/gin-gonic/gin/pull/3140
Added error return for c.Status(code) so that this can be used as return c.Status(code) to avoid/save extra return statement
Description
gin should do something to save the
return
lineHow to reproduce
when met an error we use to lines to deal with it
It will be cool to use
return c.Status(http.StatusInternalServerError)
or provide some alike method to support this