docs: fix route group example code (#4020)
This commit is contained in:
parent
28e57f58b1
commit
f2c861a24f
@ -339,16 +339,16 @@ func main() {
|
||||
router := gin.Default()
|
||||
|
||||
// Simple group: v1
|
||||
v1 := router.Group("/v1")
|
||||
{
|
||||
v1 := router.Group("/v1")
|
||||
v1.POST("/login", loginEndpoint)
|
||||
v1.POST("/submit", submitEndpoint)
|
||||
v1.POST("/read", readEndpoint)
|
||||
}
|
||||
|
||||
// Simple group: v2
|
||||
v2 := router.Group("/v2")
|
||||
{
|
||||
v2 := router.Group("/v2")
|
||||
v2.POST("/login", loginEndpoint)
|
||||
v2.POST("/submit", submitEndpoint)
|
||||
v2.POST("/read", readEndpoint)
|
||||
|
Loading…
Reference in New Issue
Block a user