Example #1
0
func (m *Mux) Handle(path string, handler Handler, methods ...string) *Route {
	return m.SubRoute(muxpath.EnsureRootSlash(path)).Handle(handler, methods...)
}
Example #2
0
func (m *Mux) SubRoute(path string) *Route {
	return m.trie.SubRoute(muxpath.EnsureRootSlash(path))
}
Example #3
0
func (s *serveHTTPTest) URL() string {
	return fmt.Sprintf("http://localhost%v", muxpath.EnsureRootSlash(s.path))
}