MCPcopy
hub / github.com/gofiber/fiber / hasPartialMatchBoundary

Function hasPartialMatchBoundary

path.go:492–510  ·  view source on GitHub ↗
(path string, matchedLength int)

Source from the content-addressed store, hash-verified

490}
491
492func hasPartialMatchBoundary(path string, matchedLength int) bool {
493 if matchedLength < 0 || matchedLength > len(path) {
494 return false
495 }
496 if matchedLength == len(path) {
497 return true
498 }
499 if matchedLength == 0 {
500 return false
501 }
502 if path[matchedLength-1] == slashDelimiter {
503 return true
504 }
505 if matchedLength < len(path) && path[matchedLength] == slashDelimiter {
506 return true
507 }
508
509 return false
510}
511
512// getMatch parses the passed url and tries to match it against the route segments and determine the parameter positions
513func (parser *routeParser) getMatch(detectionPath, path string, params *[maxParams]string, partialCheck bool) bool { //nolint:revive // Accepting a bool param is fine here

Callers 3

matchMethod · 0.85
getMatchMethod · 0.85

Calls

no outgoing calls

Tested by 1