Documentation
¶
Overview ¶
Package pathutil hosts the URL-path helpers shared by route registration and tenant resolution. The functions preserve the exact semantics that server/route_registrar.go relied on before extraction, so existing callers behave identically.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureLeadingSlash ¶
func NormalizePrefix ¶
NormalizePrefix produces the canonical form expected by StripPathPrefix: inputs "" and "/" both collapse to "" so an empty prefix never matches a real path.
func StripPathPrefix ¶
StripPathPrefix returns the part of path that follows prefix when path is under prefix (equals it exactly or has "prefix/" as its head), guarding against partial-word matches.
When ok is false, the returned string is the original path unchanged, not "" — callers can pass through StripPathPrefix without losing input.
Types ¶
This section is empty.