feat(server): 添加后端入口和统一响应格式测试路由

- 新增 server/cmd/server/main.go 作为服务入口
- 注册 /api/v1/test/* 测试端点,覆盖成功、业务错误、HTTP 错误、超时等场景
- 加载 Logger 和 Recovery 中间件
- 修复 recovery.go 未使用的 net/http 导入
- 更新 go.mod/go.sum 依赖
This commit is contained in:
2026-07-15 11:03:28 +08:00
parent 3de59c4fc2
commit 3cbb1683a6
5 changed files with 205 additions and 1 deletions
-1
View File
@@ -2,7 +2,6 @@ package middleware
import (
"log"
"net/http"
"runtime/debug"
"github.com/1024XEngineer/xinfra/server/internal/handler"