code: func (r *Route) Match(req *http.Request, match *RouteMatch) bool {
  	if r.buildOnly || r.err != nil {
  		return false
  	}
  
  	var matchErr error
  
  	// Match everything.
  	for _, m := range r.matchers {
  		if matched := m.Match(req, match); !matched {
  			if _, ok := m.(methodMatcher); ok {
  				matchErr = ErrMethodMismatch
  				continue
  			}
  
  			// Ignore ErrNotFound errors. These errors arise from match call
  			// to Subrouters.
  			//
  			// This prevents subsequent matching subrouters from failing to
  			// run middleware. If not ignored, the middleware would see a
  			// non-nil MatchErr and be skipped, even when there was a
  			// matching route.
  			if match.MatchErr == ErrNotFound {
  				match.MatchErr = nil
  			}
  
  			matchErr = nil
  			return false
  		}
  	}
  
  	if matchErr != nil {
  		match.MatchErr = matchErr
  		return false
  	}
  
  	if match.MatchErr == ErrMethodMismatch {
  		// We found a route which matches request method, clear MatchErr
  		match.MatchErr = nil
  		// Then override the mis-matched handler
  		match.Handler = r.handler
  	}
  
  	// Yay, we have a match. Let's collect some info about it.
  	if match.Route == nil {
  		match.Route = r
  	}
  	if match.Handler == nil {
  		match.Handler = r.handler
  	}
  	if match.Vars == nil {
  		match.Vars = make(map[string]string)
  	}
  
  	// Set variables.
  	r.regexp.setMatch(req, match, r)
  	return true
  }
docs: // Match matches the route against the request.