Params
Reading path parameters, wildcards, and the matched route pattern.
The three params helpers wrap chi so a handler reads path data without importing it.
Param
func Param(r *http.Request, key string) stringReturns the named path parameter from the matched route, or an empty string when it is absent.
Wildcard
func Wildcard(r *http.Request) stringReturns the value matched by a trailing /* catch-all, or an empty string when the route had no wildcard.
RoutePattern
func RoutePattern(r *http.Request) stringReturns the matched route pattern, such as /items/{id}, which is a low-cardinality label for metrics and structured logging. Returns an empty string when called outside a matched route.