mirror of
https://github.com/cnk3x/xunlei.git
synced 2026-06-03 21:01:32 +08:00
feat(pkg/cmdx): 重构命令执行模块增加生命周期钩子 - 引入新的Cmd结构体替代直接使用exec.Command - 添加preStart、onStarted、onExit生命周期钩子函数 - 使用context.WithCancelCause改进取消机制 - 增强错误处理和日志记录功能 refactor(pkg/web): 集成chi路由器替换原生mux - 集成github.com/go-chi/chi/v5作为路由库 - 重构Mux结构体使用chi.Router - 更新路由注册方法使用chi的标准API - 简化中间件处理逻辑 refactor(xlp): 优化web服务启动流程 - 将web服务启动逻辑移到OnStarted钩子中 - 使用cmdx的生命周期钩子管理web服务 - 改进上下文取消和错误处理机制 ```
10 lines
153 B
Modula-2
10 lines
153 B
Modula-2
module github.com/cnk3x/xunlei
|
|
|
|
go 1.25.4
|
|
|
|
require (
|
|
github.com/go-chi/chi/v5 v5.2.4
|
|
github.com/spf13/pflag v1.0.10
|
|
github.com/ulikunitz/xz v0.5.15
|
|
)
|