AnyMatchWithError 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. If any matcher returns an error, we cut short and return the error.
(req *http.Request)
| 428 | // case the request always matches. If any matcher returns |
| 429 | // an error, we cut short and return the error. |
| 430 | func (ms MatcherSets) AnyMatchWithError(req *http.Request) (bool, error) { |
| 431 | for _, m := range ms { |
| 432 | match, err := m.MatchWithError(req) |
| 433 | if err != nil || match { |
| 434 | return match, err |
| 435 | } |
| 436 | } |
| 437 | return len(ms) == 0, nil |
| 438 | } |
| 439 | |
| 440 | // FromInterface fills ms from an 'any' value obtained from LoadModule. |
| 441 | func (ms *MatcherSets) FromInterface(matcherSets any) error { |
no test coverage detected