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

Method Path

route.go:363–366  ·  view source on GitHub ↗

Path ----------------------------------------------------------------------- Path adds a matcher for the URL path. It accepts a template with zero or more URL variables enclosed by {}. The template must start with a "/". Variables can define an optional regexp pattern to be matched: - {name} matche

(tpl string)

Source from the content-addressed store, hash-verified

361// Variable names must be unique in a given route. They can be retrieved
362// calling mux.Vars(request).
363func (r *Route) Path(tpl string) *Route {
364 r.err = r.addRegexpMatcher(tpl, regexpTypePath)
365 return r
366}
367
368// PathPrefix -----------------------------------------------------------------
369

Callers 1

TestRedirectSlashFunction · 0.95

Calls 1

addRegexpMatcherMethod · 0.95

Tested by 1

TestRedirectSlashFunction · 0.76