AnyMatch returns true if req matches any of the matcher sets in ms or if there are no matchers, in which case the request always matches. Deprecated: Use AnyMatchWithError instead.
(req *http.Request)
| 410 | // |
| 411 | // Deprecated: Use AnyMatchWithError instead. |
| 412 | func (ms MatcherSets) AnyMatch(req *http.Request) bool { |
| 413 | for _, m := range ms { |
| 414 | match, err := m.MatchWithError(req) |
| 415 | if err != nil { |
| 416 | SetVar(req.Context(), MatcherErrorVarKey, err) |
| 417 | return false |
| 418 | } |
| 419 | if match { |
| 420 | return match |
| 421 | } |
| 422 | } |
| 423 | return len(ms) == 0 |
| 424 | } |
| 425 | |
| 426 | // AnyMatchWithError returns true if req matches any of the |
| 427 | // matcher sets in ms or if there are no matchers, in which |
nothing calls this directly
no test coverage detected