Skip to content

Commit

Permalink
refactor: refactor middleware and improve API handling
Browse files Browse the repository at this point in the history
- Remove middleware logging request and response in main function

Signed-off-by: appleboy <[email protected]>
  • Loading branch information
appleboy committed Jan 27, 2025
1 parent 438926d commit f3f028a
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions _example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ func main() {
gzip.DefaultCompression,
gzip.WithExcludedPaths([]string{"/ping2"}),
))
r.Use(func(c *gin.Context) {
log.Println("Request received")
c.Next()
log.Println("Response sent")
})

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

0 comments on commit f3f028a

Please sign in to comment.