func (s *RuleSet) Includes(check string) bool {
	if len(s.rules) == 0 {
		return s.DefaultInclude
	}

	include := !s.rules[0].include
	for _, r := range s.rules {
		if r.Match(check) {
			include = r.include
		}
	}
	return include
}
// A later Matcher takes precedence over an earlier one relative to the order added.
// Default (before matching any rules) is the opposite of the first Include/Exclude type.
// E.g., a list beginning with Include has an implicit "Exclude all" base rule, and vice versa.
// Empty RuleSet returns DefaultInclude.
A later Matcher takes precedence over an earlier one relative to the order added.
Default (before matching any rules) is the opposite of the first Include/Exclude type.
E.g., a list beginning with Include has an implicit "Exclude all" base rule, and vice versa.
Empty RuleSet returns DefaultInclude.
// A later Matcher takes precedence over an earlier one relative to the order added . // Default ( before matching any rules ) is the opposite of the first Include / Exclude type . // E . g . a list beginning with Include has an implicit " Exclude all " base rule and vice versa . // Empty RuleSet returns DefaultInclude .
func (s *RuleSet) Includes(check string) bool {
	if len(s.rules) == 0 {
		return s.DefaultInclude
	}
	include := !s.rules[0].include
	for _, r := range s.rules {
		if r.Match(check) {
			include = r.include
		}
	}
	return include
}
func ( s * RuleSet ) Includes ( check string ) bool { if len ( s . rules ) == 0 { return s . DefaultInclude } include := ! s . rules [ 0 ] . include for _ , r := range s . rules { if r . Match ( check ) { include = r . include } } return include }
A later Matcher takes precedence over an earlier one relative to the order added.
A later Matcher takes precedence over an earlier one relative to the order added .