MCPcopy Index your code
hub / github.com/coder/coder / RoutePatterns

TypeAlias RoutePatterns

coderd/httpmw/patternmatcher/routepatterns.go:22–22  ·  view source on GitHub ↗

RoutePatterns provides a method to generate a regex which will match a URL path against a collection of patterns. If any of the patterns match the path, the regex will return a successful match. Multiple patterns can be provided and they are matched in order. Example: - /api/* matches /api/1 but no

Source from the content-addressed store, hash-verified

20//
21// All patterns support an optional trailing slash.
22type RoutePatterns []string
23
24func (rp RoutePatterns) MustCompile() *regexp.Regexp {
25 re, err := rp.Compile()

Callers 1

Test_RoutePatternsFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected