- 将路由注册逻辑从主函数移至独立的 router 包 - 更新 main.go 以调用新的路由注册函数 - 删除旧的 digitalhuman/main.go 文件 - 简化常量文件中的注释
19 lines
443 B
Go
19 lines
443 B
Go
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, // 异步任务相关接口
|
|
})
|
|
}
|