:recycle:重构了部分代码

This commit is contained in:
coward
2024-03-13 17:05:02 +08:00
parent 7716a15dbb
commit 7c48551989
15 changed files with 125 additions and 29 deletions

View File

@@ -2,7 +2,7 @@ package route
import "github.com/gin-gonic/gin"
type Option func(engine *gin.Engine)
type Option func(engine *gin.RouterGroup)
var options []Option
@@ -18,7 +18,7 @@ func InitRouter() *gin.Engine {
r.Use(gin.Logger())
for _, opt := range options {
opt(r)
opt(r.Group("api"))
}
return r