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.
* Add a function to set url params for test
* [docs] add justification for SetURLVars and description of alternative approach to setting url vars.
* rename SetURLParams to SetURLVars as this is more descriptive.
* rename testing to testing_helpers as this is more descriptive.
* [docs] add stipulation to SetURLVars that it should only be used for testing purposes
* [docs] Note StrictSlash re-direct behaviour #308
* StrictSlash enabled routes return a 301 to the client
* As per the HTTP standards, non-idempotent methods, such as POST or PUT, will be followed with a GET by the client
* Users should use middleware if they wish to change this behaviour to return a HTTP 308.
* Update description of StrictSlash
* 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.
(this confused the heck out of me while trying to use Gorilla)
* Changed `request` to be just `r`, like the other handlers.
* Created complete wrapper function instead of just 2 lines.