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"))
}
Is this behavior a bug?
c.Param("piyo")is empty. 😢