forked from mirror/gin
This commit is contained in:
parent
80cd679c43
commit
cc367f9125
|
@ -386,7 +386,9 @@ func (c *Context) GetStringMapStringSlice(key string) (smss map[string][]string)
|
||||||
//
|
//
|
||||||
// router.GET("/user/:id", func(c *gin.Context) {
|
// router.GET("/user/:id", func(c *gin.Context) {
|
||||||
// // a GET request to /user/john
|
// // a GET request to /user/john
|
||||||
// id := c.Param("id") // id == "john"
|
// id := c.Param("id") // id == "/john"
|
||||||
|
// // a GET request to /user/john/
|
||||||
|
// id := c.Param("id") // id == "/john/"
|
||||||
// })
|
// })
|
||||||
func (c *Context) Param(key string) string {
|
func (c *Context) Param(key string) string {
|
||||||
return c.Params.ByName(key)
|
return c.Params.ByName(key)
|
||||||
|
|
Loading…
Reference in New Issue