fix errcheck warnings (#1739)

This commit is contained in:
Dmitry Kutakov
2019-01-18 04:32:53 +03:00
committed by thinkerou
parent 29a145c85d
commit b056a34bdc
19 changed files with 122 additions and 83 deletions

View File

@ -278,13 +278,13 @@ func TestErrorLogger(t *testing.T) {
router := New()
router.Use(ErrorLogger())
router.GET("/error", func(c *Context) {
c.Error(errors.New("this is an error"))
c.Error(errors.New("this is an error")) // nolint: errcheck
})
router.GET("/abort", func(c *Context) {
c.AbortWithError(http.StatusUnauthorized, errors.New("no authorized"))
c.AbortWithError(http.StatusUnauthorized, errors.New("no authorized")) // nolint: errcheck
})
router.GET("/print", func(c *Context) {
c.Error(errors.New("this is an error"))
c.Error(errors.New("this is an error")) // nolint: errcheck
c.String(http.StatusInternalServerError, "hola!")
})