1
0
mirror of https://github.com/labstack/echo.git synced 2025-12-01 22:51:17 +02:00

Revert "Allow parameter routes to end with a dot (/foo/:id.json)"

This reverts commit bfa14633f3.
This commit is contained in:
Vishal Rana
2018-04-11 22:34:01 -07:00
parent 28d07c3bca
commit 7c3df7703f
2 changed files with 1 additions and 9 deletions

View File

@@ -784,9 +784,6 @@ func TestRouterParamNames(t *testing.T) {
r.Add(GET, "/users/:id", func(c Context) error {
return nil
})
r.Add(GET, "/companies/:id.json", func(c Context) error {
return nil
})
r.Add(GET, "/users/:uid/files/:fid", func(c Context) error {
return nil
})
@@ -802,11 +799,6 @@ func TestRouterParamNames(t *testing.T) {
assert.Equal(t, "id", c.pnames[0])
assert.Equal(t, "1", c.Param("id"))
// Route -> /companies/:id.json
r.Find(GET, "/companies/1.json", c)
assert.Equal(t, "id", c.pnames[0])
assert.Equal(t, "1", c.Param("id"))
// Route > /users/:uid/files/:fid
r.Find(GET, "/users/1/files/1", c)
assert.Equal(t, "uid", c.pnames[0])