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

Function parseEndpointPattern

pkg/github/helper_test.go:694–700  ·  view source on GitHub ↗
(p EndpointPattern)

Source from the content-addressed store, hash-verified

692type MockBackendOption func(map[string]http.HandlerFunc)
693
694func parseEndpointPattern(p EndpointPattern) (string, string) {
695 parts := strings.SplitN(string(p), " ", 2)
696 if len(parts) != 2 {
697 return http.MethodGet, string(p)
698 }
699 return parts[0], parts[1]
700}
701
702func WithRequestMatch(pattern EndpointPattern, response any) MockBackendOption {
703 return func(handlers map[string]http.HandlerFunc) {

Callers 2

WithRequestMatchFunction · 0.85
WithRequestMatchHandlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected