diff --git a/internal/http/server/routes.go b/internal/http/routes/routes.go similarity index 99% rename from internal/http/server/routes.go rename to internal/http/routes/routes.go index 77f9b5a..c9ef076 100644 --- a/internal/http/server/routes.go +++ b/internal/http/routes/routes.go @@ -1,4 +1,4 @@ -package server +package routes import ( "net/http" diff --git a/internal/http/server/app.go b/internal/http/server/app.go index f7e328f..51d2ca8 100644 --- a/internal/http/server/app.go +++ b/internal/http/server/app.go @@ -9,6 +9,7 @@ import ( "syscall" "time" "tts/internal/config" + "tts/internal/http/routes" ) // App 表示整个TTS应用程序 @@ -26,13 +27,13 @@ func NewApp(configPath string) (*App, error) { } // 初始化服务 - ttsService, err := InitializeServices(cfg) + ttsService, err := routes.InitializeServices(cfg) if err != nil { return nil, fmt.Errorf("初始化服务失败: %w", err) } // 设置路由 - handler, err := SetupRoutes(cfg, ttsService) + handler, err := routes.SetupRoutes(cfg, ttsService) if err != nil { return nil, fmt.Errorf("设置路由失败: %w", err) }