MockHTTPClientWithHandlers creates an HTTP client with multiple handlers for different paths
(handlers map[string]http.HandlerFunc)
| 682 | |
| 683 | // MockHTTPClientWithHandlers creates an HTTP client with multiple handlers for different paths |
| 684 | func MockHTTPClientWithHandlers(handlers map[string]http.HandlerFunc) *http.Client { |
| 685 | transport := &multiHandlerTransport{handlers: handlers} |
| 686 | return &http.Client{Transport: transport} |
| 687 | } |
| 688 | |
| 689 | // Compatibility helpers to replace github.com/migueleliasweb/go-github-mock in tests |
| 690 | type EndpointPattern string |
no outgoing calls
no test coverage detected