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

Function MockHTTPClientWithHandler

pkg/github/helper_test.go:676–681  ·  view source on GitHub ↗

MockHTTPClientWithHandler creates an HTTP client with a single handler function

(handler http.HandlerFunc)

Source from the content-addressed store, hash-verified

674
675// MockHTTPClientWithHandler creates an HTTP client with a single handler function
676func MockHTTPClientWithHandler(handler http.HandlerFunc) *http.Client {
677 handlers := map[string]http.HandlerFunc{
678 "": handler, // Empty key acts as catch-all
679 }
680 return MockHTTPClientWithHandlers(handlers)
681}
682
683// MockHTTPClientWithHandlers creates an HTTP client with multiple handlers for different paths
684func MockHTTPClientWithHandlers(handlers map[string]http.HandlerFunc) *http.Client {

Callers 1

mockRESTPermissionServerFunction · 0.85

Calls 1

Tested by

no test coverage detected