diff options
author | tjpcc <tjp@ctrl-c.club> | 2023-09-16 11:27:45 -0600 |
---|---|---|
committer | tjpcc <tjp@ctrl-c.club> | 2023-09-16 11:27:45 -0600 |
commit | 4a1764e9005ace0af1d694e62d87077f833abe9f (patch) | |
tree | fbad5954b94184be37f9842b0a2d86012e8ecf55 /router.go | |
parent | 0ab036d34c5526e8c39da798bec2bc5d4a70a6b2 (diff) |
add a docstring note about root paths in mounted sub-routersv1.3.3
Diffstat (limited to 'router.go')
-rw-r--r-- | router.go | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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, "/") |