package init_serve import ( "github.com/gin-gonic/gin" _ "hongze/hz_eta_docs_api/docs" "hongze/hz_eta_docs_api/global" "hongze/hz_eta_docs_api/middleware" "hongze/hz_eta_docs_api/routers" ) // InitRouter 初始化路由 func InitRouter() (r *gin.Engine) { gin.SetMode(global.CONFIG.Serve.RunMode) r = gin.Default() r.Use(middleware.Cors()) r.Use(middleware.Recover()) rBase := r.Group("api/") routers.InitVersionUpdateLog(rBase) // 版本更新日志 return }