code: func (r *Router) Match(req *http.Request, match *RouteMatch) bool {
  	for _, route := range r.routes {
  		if route.Match(req, match) {
  			// Build middleware chain if no error was found
  			if match.MatchErr == nil {
  				for i := len(r.middlewares) - 1; i >= 0; i-- {
  					match.Handler = r.middlewares[i].Middleware(match.Handler)
  				}
  			}
  			return true
  		}
  	}
  
  	if match.MatchErr == ErrMethodMismatch {
  		if r.MethodNotAllowedHandler != nil {
  			match.Handler = r.MethodNotAllowedHandler
  			return true
  		}
  
  		return false
  	}
  
  	// Closest match for a router (includes sub-routers)
  	if r.NotFoundHandler != nil {
  		match.Handler = r.NotFoundHandler
  		match.MatchErr = ErrNotFound
  		return true
  	}
  
  	match.MatchErr = ErrNotFound
  	return false
  }
docs: // Match attempts to match the given request against the router's registered routes.
  //
  // If the request matches a route of this router or one of its subrouters the Route,
  // Handler, and Vars fields of the the match argument are filled and this function
  // returns true.
  //
  // If the request does not match any of this router's or its subrouters' routes
  // then this function returns false. If available, a reason for the match failure
  // will be filled in the match argument's MatchErr field. If the match failure type
  // (eg: not found) has a registered handler, the handler is assigned to the Handler
  // field of the match argument.