Documentation
¶
Overview ¶
Package pattern joins and checks route paths written in Go's net/http pattern syntax ("/users/{id}", "/files/{path...}").
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Join ¶
Join concatenates path parts with exactly one slash between them. Empty parts and "/" parts are skipped. A trailing slash on the last non-empty part is kept, and becomes "{$}" so that ServeMux matches it exactly instead of as a subtree. The root path "/" becomes "/{$}" for the same reason; use "/{path...}" for a catch-all.
func Normalize ¶
Normalize replaces wildcard names so that two patterns matching the same requests compare equal: "/users/{id}" and "/users/{name}" both become "/users/{}".
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.