Skip to content

goa-go/router

Repository files navigation

goa-router

Router middleware for goa.

Build Status Codecov Go Doc Go Report

  • Based on httprouter
  • Multiple route middleware
  • Named URL parameters
  • Support for 405 Method Not Allowed
  • Responds to OPTIONS requests with matching methods

Installation

go get -u github.com/goa-go/goa 

Example

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())
  ...
}

License

MIT

Releases

No releases published

Packages

No packages published

Languages