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

Method StrictSlash

mux.go:245–248  ·  view source on GitHub ↗

StrictSlash defines the trailing slash behavior for new routes. The initial value is false. When true, if the route path is "/path/", accessing "/path" will perform a redirect to the former and vice versa. In other words, your application will always see the path as specified in the route. When fa

(value bool)

Source from the content-addressed store, hash-verified

243// be determined from a prefix alone. However, any subrouters created from that
244// route inherit the original StrictSlash setting.
245func (r *Router) StrictSlash(value bool) *Router {
246 r.strictSlash = value
247 return r
248}
249
250// SkipClean defines the path cleaning behaviour for new routes. The initial
251// value is false. Users should be careful about which routes are not cleaned

Callers 4

TestStrictSlashFunction · 0.95
TestRedirectSlashFunction · 0.95

Calls

no outgoing calls

Tested by 4

TestStrictSlashFunction · 0.76
TestRedirectSlashFunction · 0.76