Skip to content

Latest commit

 

History

History
46 lines (36 loc) · 1.13 KB

README.md

File metadata and controls

46 lines (36 loc) · 1.13 KB

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