mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-23 01:57:55 +08:00
Merge branch 'master' into chore/v1.3.0
This commit is contained in:
commit
ed9dd4240a
@ -238,7 +238,7 @@ func main() {
|
|||||||
func main() {
|
func main() {
|
||||||
router := gin.Default()
|
router := gin.Default()
|
||||||
|
|
||||||
// This handler will match /user/john but will not match neither /user/ or /user
|
// This handler will match /user/john but will not match /user/ or /user
|
||||||
router.GET("/user/:name", func(c *gin.Context) {
|
router.GET("/user/:name", func(c *gin.Context) {
|
||||||
name := c.Param("name")
|
name := c.Param("name")
|
||||||
c.String(http.StatusOK, "Hello %s", name)
|
c.String(http.StatusOK, "Hello %s", name)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user