Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
rtribotte committed Sep 16, 2022
1 parent ccb6a2c commit 64b54e2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions docs/content/routing/routers/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,7 @@ The table below lists all the available matchers:
| ```HostRegexp(`example.com`, `{subdomain:[a-z]+}.example.com`, ...)``` | Match the request domain. See "Regexp Syntax" below. |
| ```Method(`GET`, ...)``` | Check if the request method is one of the given `methods` (`GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`) |
| ```Path(`/path`, `/articles/{cat:[a-z]+}/{id:[0-9]+}`, ...)``` | Match exact request path. See "Regexp Syntax" below. |
| ```Path(`/{path:(?i:products)}`, `/{path:(?i:articles)/{cat:[a-z]+}/{id:[0-9]+}`)``` | Match exact insensitive case request path. See "Regexp Syntax" below. |
| ```PathPrefix(`/products/`, `/articles/{cat:[a-z]+}/{id:[0-9]+}`)``` | Match request prefix path. See "Regexp Syntax" below. |
| ```PathPrefix(`/{path:(?i:Products)}`, `/{path:(?i:articles)/{cat:[a-z]+}/{id:[0-9]+}`)``` | Match insensitive case request prefix path. See "Regexp Syntax" below. |
| ```Query(`foo=bar`, `bar=baz`)``` | Match Query String parameters. It accepts a sequence of key=value pairs. |
| ```ClientIP(`10.0.0.0/16`, `::1`)``` | Match if the request client IP is one of the given IP/CIDR. It accepts IPv4, IPv6 and CIDR formats. |

Expand All @@ -261,6 +259,7 @@ The table below lists all the available matchers:
The regexp name (`name` in the above example) is an arbitrary value, that exists only for historical reasons.

Any `regexp` supported by [Go's regexp package](https://golang.org/pkg/regexp/) may be used.
For example, here is a case insensitive path matcher syntax: ```Path(`/{path:(?i:Products)}`)```.

!!! info "Combining Matchers Using Operators and Parenthesis"

Expand Down

0 comments on commit 64b54e2

Please sign in to comment.