Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion site/src/content/docs/es/guide/routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,18 @@ e.DELETE("/users/:id", deleteUser)
e.GET("/static/*", serveFiles) // wildcard
```

`Any` registra un handler para todos los métodos soportados, y `Match` para un conjunto específico:
`Any` registra un handler para cualquier método HTTP — incluidos los que no están en
la lista predefinida de Echo — y `Match` para un conjunto específico:

```go
e.Any("/ping", pong)
e.Match([]string{http.MethodGet, http.MethodPost}, "/form", handleForm)
```

:::note
Una ruta de método específico registrada para el mismo path tiene precedencia sobre la ruta `Any`.
:::

## Tipos de coincidencia

| Patrón | Tipo | Ejemplo de coincidencia |
Expand Down
7 changes: 6 additions & 1 deletion site/src/content/docs/guide/routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,18 @@ e.DELETE("/users/:id", deleteUser)
e.GET("/static/*", serveFiles) // wildcard
```

`Any` registers a handler for all supported methods, and `Match` for a specific set:
`Any` registers a handler for any HTTP method — including ones not in Echo's predefined
list — and `Match` for a specific set:

```go
e.Any("/ping", pong)
e.Match([]string{http.MethodGet, http.MethodPost}, "/form", handleForm)
```

:::note
A method-specific route registered for the same path takes precedence over the `Any` route.
:::

## Match types

| Pattern | Type | Example match |
Expand Down
7 changes: 6 additions & 1 deletion site/src/content/docs/ja/guide/routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,18 @@ e.DELETE("/users/:id", deleteUser)
e.GET("/static/*", serveFiles) // wildcard
```

`Any` はサポートされているすべてのメソッドにハンドラを登録し、`Match` は指定した集合に登録します。
`Any` は任意の HTTP メソッド(Echo にあらかじめ定義された一覧にないものも含む)にハンドラを
登録し、`Match` は指定した集合に登録します。

```go
e.Any("/ping", pong)
e.Match([]string{http.MethodGet, http.MethodPost}, "/form", handleForm)
```

:::note
同じパスに登録されたメソッド固有のルートは、`Any` ルートより優先されます。
:::

## マッチ種別

| パターン | 種別 | マッチ例 |
Expand Down
7 changes: 6 additions & 1 deletion site/src/content/docs/pt-br/guide/routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,18 @@ e.DELETE("/users/:id", deleteUser)
e.GET("/static/*", serveFiles) // wildcard
```

`Any` registra um handler para todos os métodos suportados, e `Match` para um conjunto específico:
`Any` registra um handler para qualquer método HTTP — incluindo os que não estão na
lista predefinida do Echo — e `Match` para um conjunto específico:

```go
e.Any("/ping", pong)
e.Match([]string{http.MethodGet, http.MethodPost}, "/form", handleForm)
```

:::note
Uma rota de método específico registrada para o mesmo caminho tem precedência sobre a rota `Any`.
:::

## Tipos de correspondência

| Padrão | Tipo | Exemplo correspondente |
Expand Down
6 changes: 5 additions & 1 deletion site/src/content/docs/zh-cn/guide/routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,17 @@ e.DELETE("/users/:id", deleteUser)
e.GET("/static/*", serveFiles) // wildcard
```

`Any` 会为所有支持的方法注册处理函数,`Match` 则用于一组指定方法:
`Any` 会为任意 HTTP 方法(包括不在 Echo 预定义列表中的方法)注册处理函数,`Match` 则用于一组指定方法:

```go
e.Any("/ping", pong)
e.Match([]string{http.MethodGet, http.MethodPost}, "/form", handleForm)
```

:::note
为同一路径注册的特定方法路由优先于 `Any` 路由。
:::

## 匹配类型

| 模式 | 类型 | 匹配示例 |
Expand Down
Loading