func NewMatcher(t MatchType, n, v string) (*Matcher, error) {
	m := &Matcher{
		Type:  t,
		Name:  n,
		Value: v,
	}
	if t == MatchRegexp || t == MatchNotRegexp {
		re, err := regexp.Compile("^(?:" + v + ")$")
		if err != nil {
			return nil, err
		}
		m.re = re
	}
	return m, nil
}
func NewMatcher(t MatchType, n, v string) (*Matcher, error) {
	m := &Matcher{
		Type:  t,
		Name:  n,
		Value: v,
	}
	if t == MatchRegexp || t == MatchNotRegexp {
		re, err := regexp.Compile("^(?:" + v + ")$")
		if err != nil {
			return nil, err
		}
		m.re = re
	}
	return m, nil
}
func NewMatcher ( t MatchType , n , v string ) ( * Matcher , error ) { m := & Matcher { Type : t , Name : n , Value : v , } if t == MatchRegexp || t == MatchNotRegexp { re , err := regexp . Compile ( " " + v + " " ) if err != nil { return nil , err } m . re = re } return m , nil }
// NewMatcher returns a matcher object.
NewMatcher returns a matcher object .