github.com/rkusa/router

A middleware that provides high performance HTTP request routing.


License
MIT
Install
go get github.com/rkusa/router

Documentation

router

A middleware that works well (but not exclusively) with rkusa/web and provides high performance HTTP request routing using httptreemux.

Build Status GoDoc

Example

routes := router.New()

routes.GET("/users/:id", func(rw http.ResponseWriter, r *http.Request) {
  id := router.Param(r, "id")
  // ...
})

app.Use(routes.Middleware())

License

MIT