Router middleware for goa.
- Based on httprouter
- Multiple route middleware
- Named URL parameters
- Support for 405 Method Not Allowed
- Responds to OPTIONS requests with matching methods
go get -u github.com/goa-go/goa
package main
import (
...
"github.com/goa-go/goa"
"github.com/goa-go/router"
)
func main() {
app := goa.New()
router := router.New()
router.GET("/", func(c *goa.Context) {
c.String("Hello Goa!")
})
...
app.Use(router.Routes())
...
}