docs: fix route group example code (#4020)

This commit is contained in:
demouth 2024-09-15 09:54:23 +09:00 committed by GitHub
parent 28e57f58b1
commit f2c861a24f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)