mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-18 14:52:18 +08:00
Update README.md
This commit is contained in:
parent
e2212d40c6
commit
c19da25a21
@ -133,7 +133,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