Files
remark42/vendor/github.com/pkg4go/rewrite/Readme.md
T
2018-02-18 14:53:51 -06:00

835 B

Build status License GoDoc

rewrite

golang URL rewriting

Usage

import "github.com/pkg4go/rewrite"

// ...

handler := rewrite.NewHandler(map[string]string{
  "/a": "/b",
  "/api/(.*)", "/api/v1/$1",
  "/api/(.*)/actions/(.*)", "/api/v1/$1/actions/$2",
  "/from/:one/to/:two", "/from/:two/to/:one",
})

// ...

License

MIT