code: func NewMatcher(pattern string) Matcher {
  	if pattern == "" {
  		return nil
  	}
  	if ip := net.ParseIP(pattern); ip != nil {
  		return IPMatcher(ip)
  	}
  	if _, inet, err := net.ParseCIDR(pattern); err == nil {
  		return CIDRMatcher(inet)
  	}
  	return DomainMatcher(pattern)
  }
docs: // NewMatcher creates a Matcher for the given pattern.
  // The acutal Matcher depends on the pattern:
  // IP Matcher if pattern is a valid IP address.
  // CIDR Matcher if pattern is a valid CIDR address.
  // Domain Matcher if both of the above are not.