func (r *Router) Match(req *http.Request, match *RouteMatch) bool {
	for _, route := range r.routes {
		if route.Match(req, match) {
			return true
		}
	}
	if r.NotFoundHandler != nil {
		match.Handler = r.NotFoundHandler
		return true
	}
	return false
}
Match matches registered routes against the request.
package mux
import (
	"errors"
	"fmt"
	"net/http"
	"path"
	"regexp"
	"strings"
)
func NewRouter() *Router {
	return &Router{namedRoutes: make(map[string]*Route), KeepContext: false}
}
type Router struct {
	NotFoundHandler http.Handler
	parent parentRoute
	routes []*Route
	namedRoutes map[string]*Route
	strictSlash bool
	skipClean bool
	KeepContext bool
	useEncodedPath bool
}