buaazp / fasthttprouter

A high performance fasthttp request router that scales well
http://godoc.org/github.com/buaazp/fasthttprouter
BSD 3-Clause "New" or "Revised" License
872 stars 91 forks source link

Add Group and Middleware support #44

Closed vinhjaxt closed 6 years ago

vinhjaxt commented 6 years ago

Hello contributors,

I am looking for something like this

router.Use(MiddlewareFunction)

and

api = router.Group("/api")
api.Use(APIMiddleware)
api.GET("/", handle)

Can you add this features? Thanks.

savsgio commented 6 years ago

For use middlewares in fasthttp, I recommend to use Atreugo (https://github.com/savsgio/atreugo). It is built on top of fasthttp and it use fasthttprouter internally for routing.

vinhjaxt commented 6 years ago

Yes, i will take a look. Thank you.