MCPcopy
hub / github.com/gorilla/mux / PathPrefix

Method PathPrefix

route.go:379–382  ·  view source on GitHub ↗

PathPrefix ----------------------------------------------------------------- PathPrefix adds a matcher for the URL path prefix. This matches if the given template is a prefix of the full URL path. See Route.Path() for details on the tpl argument. Note that it does not treat slashes specially ("/foo

(tpl string)

Source from the content-addressed store, hash-verified

377// Also note that the setting of Router.StrictSlash() has no effect on routes
378// with a PathPrefix matcher.
379func (r *Route) PathPrefix(tpl string) *Route {
380 r.err = r.addRegexpMatcher(tpl, regexpTypePrefix)
381 return r
382}
383
384// Query ----------------------------------------------------------------------
385

Callers

nothing calls this directly

Calls 1

addRegexpMatcherMethod · 0.95

Tested by

no test coverage detected