MCPcopy
hub / github.com/github/github-mcp-server / WithRequestMatchHandler

Function WithRequestMatchHandler

pkg/github/helper_test.go:722–727  ·  view source on GitHub ↗
(pattern EndpointPattern, handler http.HandlerFunc)

Source from the content-addressed store, hash-verified

720}
721
722func 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
729func NewMockedHTTPClient(options ...MockBackendOption) *http.Client {
730 handlers := map[string]http.HandlerFunc{}

Callers 12

Test_CreateRepositoryFunction · 0.85
Test_PushFilesFunction · 0.85
Test_DeleteFileFunction · 0.85
Test_ListTagsFunction · 0.85
Test_GetTagFunction · 0.85
Test_ListReleasesFunction · 0.85
Test_GetLatestReleaseFunction · 0.85
Test_GetReleaseByTagFunction · 0.85
Test_resolveGitReferenceFunction · 0.85
Test_StarRepositoryFunction · 0.85
Test_UnstarRepositoryFunction · 0.85

Calls 1

parseEndpointPatternFunction · 0.85

Tested by

no test coverage detected