Skip to content

Commit

Permalink
docs(context): #3369 modify the annotation about Context.Param() (#3414)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cookiery authored Dec 1, 2022
1 parent 80cd679 commit cc367f9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion context.go
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,9 @@ func (c *Context) GetStringMapStringSlice(key string) (smss map[string][]string)
//
// router.GET("/user/:id", func(c *gin.Context) {
// // 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 {
return c.Params.ByName(key)
Expand Down

0 comments on commit cc367f9

Please sign in to comment.