mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-22 01:12:16 +08:00
Add small example
This commit is contained in:
parent
404ceeaa92
commit
9bd25051cb
@ -252,6 +252,11 @@ func main() {
|
|||||||
c.String(http.StatusOK, message)
|
c.String(http.StatusOK, message)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// For each matched request Context will hold the route definition
|
||||||
|
router.POST("/user/:name/*action", func(c *gin.Context) {
|
||||||
|
c.FullPath() == "/user/:name/*action" // true
|
||||||
|
})
|
||||||
|
|
||||||
router.Run(":8080")
|
router.Run(":8080")
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user