(regs []string, shouldMatch bool)
| 179 | } |
| 180 | |
| 181 | func newRegexPredicate(regs []string, shouldMatch bool) (Predicate, error) { |
| 182 | m, err := regexp.NewRegexp(regs, shouldMatch) |
| 183 | if err != nil { |
| 184 | return nil, err |
| 185 | } |
| 186 | |
| 187 | return ®exPredicate{ |
| 188 | matcher: m, |
| 189 | }, nil |
| 190 | } |
| 191 | |
| 192 | func (p *regexPredicate) String() string { |
| 193 | return fmt.Sprintf("RegexPredicate{%s}", p.matcher.String()) |
no test coverage detected