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

Method Host

route.go:303–306  ·  view source on GitHub ↗

Host ----------------------------------------------------------------------- Host adds a matcher for the URL host. It accepts a template with zero or more URL variables enclosed by {}. Variables can define an optional regexp pattern to be matched: - {name} matches anything until the next dot. - {n

(tpl string)

Source from the content-addressed store, hash-verified

301// Variable names must be unique in a given route. They can be retrieved
302// calling mux.Vars(request).
303func (r *Route) Host(tpl string) *Route {
304 r.err = r.addRegexpMatcher(tpl, regexpTypeHost)
305 return r
306}
307
308// MatcherFunc ----------------------------------------------------------------
309

Callers

nothing calls this directly

Calls 1

addRegexpMatcherMethod · 0.95

Tested by

no test coverage detected