From b68f4baed9e7e35fbc3ac1e302407e766504767c Mon Sep 17 00:00:00 2001 From: guang999 Date: Fri, 26 Nov 2021 15:08:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3onlyForV2()=E5=87=BD=E6=95=B0?= =?UTF-8?q?=EF=BC=8C=E4=BD=BF=E6=B5=8B=E8=AF=95=E8=BE=93=E5=87=BA=E4=B8=8E?= =?UTF-8?q?=E5=8D=9A=E5=AE=A2=E4=B8=8A=E7=9A=84=E7=BB=93=E6=9E=9C=E4=B8=80?= =?UTF-8?q?=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gee-web/day5-middleware/main.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gee-web/day5-middleware/main.go b/gee-web/day5-middleware/main.go index b66dbdc..30f7a1c 100644 --- a/gee-web/day5-middleware/main.go +++ b/gee-web/day5-middleware/main.go @@ -31,8 +31,7 @@ func onlyForV2() gee.HandlerFunc { return func(c *gee.Context) { // Start timer t := time.Now() - // if a server error occurred - c.Fail(500, "Internal Server Error") + c.Next() // Calculate resolution time log.Printf("[%d] %s in %v for group v2", c.StatusCode, c.Req.RequestURI, time.Since(t)) }