MCPcopy Index your code
hub / github.com/github/github-mcp-server / MockHTTPClientWithHandlers

Function MockHTTPClientWithHandlers

pkg/github/helper_test.go:684–687  ·  view source on GitHub ↗

MockHTTPClientWithHandlers creates an HTTP client with multiple handlers for different paths

(handlers map[string]http.HandlerFunc)

Source from the content-addressed store, hash-verified

682
683// MockHTTPClientWithHandlers creates an HTTP client with multiple handlers for different paths
684func 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
690type EndpointPattern string

Calls

no outgoing calls

Tested by

no test coverage detected