Is this behavior a bug? ``` package main import ( "net/http" "github.com/labstack/echo" "github.com/labstack/echo/engine/standard" ) func main() { e := echo.New() e.GET("/:piyo", func(c echo.Context) error { return c.String(http.StatusOK, "fail: "+c.Param("piyo")) }) e.POST("/:hoge", func(c echo.Context) error { return c.String(http.StatusOK, "success: "+c.Param("hoge")) }) e.Run(standard.New(":1323")) } ``` `c.Param("piyo")` is empty. 😢
Activity
vishr commentedon Apr 21, 2016
It is like that. In this case
:piyois overridden by:hoge; you should use the same name and if that doesn't work get it by indexContext.P(0).ww24 commentedon Apr 21, 2016
Thanks. But, this behavior is unintelligible.
I want to use different params for code readability.
vishr commentedon Apr 21, 2016
I understand. I will keep this issue open and give it a thought later.
fundon commentedon Aug 2, 2016
Maybe, IMO https://github.com/trekjs/router/blob/master/index.js
chenjie4255 commentedon Aug 8, 2016
+1, having a same problem :(
alfg commentedon Nov 14, 2016
Same issue here. It would be great for the scenario below:
In this case, c.Param("name") doesn't work for the 2nd route above. I will use
Context.P(0)for now, though.