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

Function joinRoute

pkg/http/oauth/oauth.go:276–287  ·  view source on GitHub ↗
(basePath, pattern string)

Source from the content-addressed store, hash-verified

274}
275
276func joinRoute(basePath, pattern string) string {
277 if basePath == "" {
278 return pattern
279 }
280 if pattern == "" {
281 return basePath
282 }
283 if before, ok := strings.CutSuffix(basePath, "/"); ok {
284 return before + pattern
285 }
286 return basePath + pattern
287}

Callers 1

routesForPatternMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected