refactor: 重构项目结构,分离路由注册与主函数入口

- 将路由注册逻辑从主函数移至独立的 router 包
- 更新 main.go 以调用新的路由注册函数
- 删除旧的 digitalhuman/main.go 文件
- 简化常量文件中的注释
This commit is contained in:
2026-04-27 11:52:03 +08:00
parent f66925eb73
commit 8679832019
3 changed files with 26 additions and 13 deletions

View File

@@ -0,0 +1,18 @@
package router
import (
"digital-human/digitalhuman/controller"
"gitea.com/red-future/common/http"
)
func Router() {
// 注册路由
http.RouteRegister([]interface{}{
controller.Audio, // 语音相关接口
controller.CustomVoice, // 自定义语音相关接口
controller.DigitalHuman, // 数字人相关接口
controller.Video, // 视频相关接口
controller.AsyncTask, // 异步任务相关接口
})
}