Skip to content

Commit f3f028a

Browse files
committed
refactor: refactor middleware and improve API handling
- Remove middleware logging request and response in main function Signed-off-by: appleboy <appleboy.tw@gmail.com>
1 parent 438926d commit f3f028a

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

_example/main.go

-5
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ func main() {
2020
gzip.DefaultCompression,
2121
gzip.WithExcludedPaths([]string{"/ping2"}),
2222
))
23-
r.Use(func(c *gin.Context) {
24-
log.Println("Request received")
25-
c.Next()
26-
log.Println("Response sent")
27-
})
2823

2924
r.GET("/ping", func(c *gin.Context) {
3025
c.String(http.StatusOK, "pong "+fmt.Sprint(time.Now().Unix()))

0 commit comments

Comments
 (0)