(pattern EndpointPattern, handler http.HandlerFunc)
| 720 | } |
| 721 | |
| 722 | func WithRequestMatchHandler(pattern EndpointPattern, handler http.HandlerFunc) MockBackendOption { |
| 723 | return func(handlers map[string]http.HandlerFunc) { |
| 724 | method, path := parseEndpointPattern(pattern) |
| 725 | handlers[method+" "+path] = handler |
| 726 | } |
| 727 | } |
| 728 | |
| 729 | func NewMockedHTTPClient(options ...MockBackendOption) *http.Client { |
| 730 | handlers := map[string]http.HandlerFunc{} |
no test coverage detected