chore: upgrade golangci-lint and fix golangci-lint error (#3278)

This commit is contained in:
thinkerou
2022-08-15 21:38:20 +08:00
committed by GitHub
parent 1b5ba251cf
commit b04917c53e
12 changed files with 74 additions and 60 deletions

View File

@ -358,13 +358,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")) // nolint: errcheck
c.Error(errors.New("this is an error")) //nolint: errcheck
})
router.GET("/abort", func(c *Context) {
c.AbortWithError(http.StatusUnauthorized, errors.New("no authorized")) // nolint: errcheck
c.AbortWithError(http.StatusUnauthorized, errors.New("no authorized")) //nolint: errcheck
})
router.GET("/print", func(c *Context) {
c.Error(errors.New("this is an error")) // nolint: errcheck
c.Error(errors.New("this is an error")) //nolint: errcheck
c.String(http.StatusInternalServerError, "hola!")
})