From 4a1764e9005ace0af1d694e62d87077f833abe9f Mon Sep 17 00:00:00 2001 From: tjpcc Date: Sat, 16 Sep 2023 11:27:45 -0600 Subject: add a docstring note about root paths in mounted sub-routers --- router.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/router.go b/router.go index 2d420d0..71ef74c 100644 --- a/router.go +++ b/router.go @@ -71,6 +71,9 @@ func (r Router) Match(request *Request) (Handler, map[string]string) { // The prefix pattern may include segment :wildcards, but no *remainder segment. The // mounted sub-router should have patterns which only include the portion of the path // after whatever was matched by the prefix pattern. +// +// The root pattern ("/") in the sub-router will become a route which must end with a +// forward slash. func (r *Router) Mount(prefix string, subrouter *Router) { prefix = strings.TrimSuffix(prefix, "/") -- cgit v1.2.3