Skip to content

Commit a091012

Browse files
authored
feat: use params in example.go (#50)
1 parent 764bcfc commit a091012

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

example/example.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ func main() {
8383
c.String(http.StatusOK, "pong")
8484
})
8585
router.GET("/pong/:id", func(c *gin.Context) {
86-
c.String(http.StatusOK, "pong")
86+
id := c.Param("id")
87+
c.String(http.StatusOK, "pong %s", id)
8788
})
8889

8990
logger.Info("Starting server")

0 commit comments

Comments
 (0)