func MatchRegexp(expr string) MatcherFunc {
	re, err := regexp.Compile(expr)
	if err != nil {
		panic(fmt.Sprintf("ant: regexp %q - %s", expr, err))
	}
	return func(url *url.URL) bool {
		return re.MatchString(url.Host + normalizePath(url.Path))
	}
}
MatchRegexp returns a new regexp matcher.

The matcher returns true for all URLs that match
the regexp, the URL does not contain the scheme
and the query parameters.
package ant
import (
	"fmt"
	"net/url"
	"regexp"
	"github.com/tidwall/match"
)
type Matcher interface {
	Match(url *url.URL) bool
}
type MatcherFunc func(*url.URL) bool
func (mf MatcherFunc) Match(url *url.URL) bool {
	return mf(url)
}
func MatchHostname(host string) MatcherFunc {
	return func(url *url.URL) bool {
		return url.Host == host
	}
}
func MatchPattern(pattern string) MatcherFunc {
	return func(url *url.URL) bool {
		return match.Match(url.Host+normalizePath(url.Path), pattern)
	}
}