func (t *Trie) FindRoutesForPath(path string) []*Match {
	context := newFindContext()
	matches := []*Match{}
	context.matchFunc = func(httpMethod, path string, node *node) {
		params := context.paramsAsMap()
		for _, route := range node.HttpMethodToRoute {
			matches = append(
				matches,
				&Match{
					Route:  route,
					Params: params,
				},
			)
		}
	}
	t.root.find("", path, context)
	return matches
}
func (t *Trie) FindRoutesForPath(path string) []*Match {
	context := newFindContext()
	matches := []*Match{}
	context.matchFunc = func(httpMethod, path string, node *node) {
		params := context.paramsAsMap()
		for _, route := range node.HttpMethodToRoute {
			matches = append(
				matches,
				&Match{
					Route:  route,
					Params: params,
				},
			)
		}
	}
	t.root.find("", path, context)
	return matches
}
func ( t * Trie ) FindRoutesForPath ( path string ) [ ] * Match { context := newFindContext ( ) matches := [ ] * Match { } context . matchFunc = func ( httpMethod , path string , node * node ) { params := context . paramsAsMap ( ) for _ , route := range node . HttpMethodToRoute { matches = append ( matches , & Match { Route : route , Params : params , } , ) } } t . root . find ( " " , path , context ) return matches }
// Given a path, and whatever the http method, return all the matching routes.
Given a path and whatever the http method return all the matching routes .