Update httprouter version and edit readme about the named parameters

This commit is contained in:
SRK.Lyu 2015-01-31 20:09:44 +08:00
parent 2d1291329a
commit d2c3699957
2 changed files with 3 additions and 2 deletions

2
Godeps/Godeps.json generated
View File

@ -4,7 +4,7 @@
"Deps": [ "Deps": [
{ {
"ImportPath": "github.com/julienschmidt/httprouter", "ImportPath": "github.com/julienschmidt/httprouter",
"Rev": "90d58bada7e6154006f2728ee09053271154a8f6" "Rev": "00ce1c6a267162792c367acc43b1681a884e1872"
} }
] ]
} }

View File

@ -133,7 +133,8 @@ func main() {
c.String(200, message) c.String(200, message)
}) })
// However, this one will match /user/john and also /user/john/send // However, this one will match /user/john/ and also /user/john/send
// If no other routers match /user/john, it will redirect to /user/join/
r.GET("/user/:name/*action", func(c *gin.Context) { r.GET("/user/:name/*action", func(c *gin.Context) {
name := c.Params.ByName("name") name := c.Params.ByName("name")
action := c.Params.ByName("action") action := c.Params.ByName("action")