* [docs] Clarify SetURLVars
Clarify in documentation that SetURLVars does not modify the given
*htttp.Request, provide an example of usage.
* Short and sweet function doc, example test.
The existing options matchPrefix, matchHost, and matchQueries are
mutually exclusive so there's no point in having a separate boolean
argument for each one. It's clearer if there's a single type variable.
strictSlash and useEncodedPath were also being passed as naked bools so
I've wrapped these in a struct called routeRegexpOptions for more clarity
at the call site.
* Test method-based subrouters for multiple matching paths
* Pass TestMethodsSubrouter
* Change http.Method* constants to string literals
- Make compatible with Go v1.5
* Make TestMethodsSubrouter stateless and concurrent
* Remove t.Run and break up tests for concurrency
* Use backticks to remove quote escaping
* Remove global method handlers and HTTP method constants
* Move misplaced tests and fix comments.
* Support building URLs with non-http schemes.
- Capture first scheme configured for a route for use when building
URLs.
- Add new Route.URLScheme method similar to URLHost and URLPath.
- Update Route.URLHost and Route.URL to use the captured scheme if
present.
* Remove Route.URLScheme method.
* Remove UTF-8 BOM.
* Add mechanism to route based on the escaped path, correct request mocking in tests
* Remove unneccessary regex matching, substitute with string slicing
* Add test case and handling for requests with no host/scheme
This test focuses on the feature of allowing sub-routers error handlers to precede the parents, rather than the code change required to provide this functionality.
The router now associates a regexp named group with each mux variable.
It only fills variables when capturing group name match instead of
relying on indices, which doesn't work if a variable regexp has interior
capturing groups.
Fixes#62
Issue #16: Added regex support for matching headers
Issue #16 : Addressed code review and refactored support for regex into
a separate function
Added compiled regex to route matcher
Issue #16: Added regex support for matching headers
Issue #16 : Addressed code review and refactored support for regex into
a separate function
Added compiled regex to route matcher