|
|
179aacac04
|
docs: 添加模块上下文文档 (AGENTS.md)
为各模块添加上下文文档,帮助 AI 助手理解代码结构:
- AGENTS.md: 项目根目录上下文
- docs/AGENTS.md: 文档目录说明
- internal/AGENTS.md: 内部包结构概览
- 各子模块 AGENTS.md: 模块特定上下文和约定
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-04-02 16:25:51 +08:00 |
|
|
|
413e418b37
|
test: 添加 handler/logging/middleware/server 模块单元测试
- internal/handler/static_test.go: 21 个测试用例覆盖静态文件服务和路径遍历安全
- internal/handler/router_test.go: 9 个测试用例覆盖路由注册和方法区分
- internal/logging/logging_test.go: 7 个测试用例覆盖日志级别解析
- internal/middleware/middleware_test.go: 4 个测试用例覆盖中间件链逆序包装
- internal/server/server_test.go: 5 个测试用例覆盖服务器创建和停止
- internal/server/vhost_test.go: 18 个测试用例覆盖虚拟主机路由
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-04-02 16:21:49 +08:00 |
|
|
|
b445bca96a
|
feat(server): 实现基础 HTTP 服务器核心功能
使用 fasthttp 替代 net/http,实现 Phase 2 核心模块:
- HTTP 服务器:fasthttp.Server 配置超时和连接限制
- 路由系统:fasthttp/router 基于 radix tree 匹配
- 静态文件服务:安全检查、索引文件支持
- 日志系统:zerolog 结构化日志
- 中间件框架:链式组合接口
- 虚拟主机管理:按 Host 头选择处理器
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-04-02 15:23:54 +08:00 |
|
|
|
06e8d55ef5
|
test(config): 添加配置模块单元测试
- 添加 internal/app 包测试(版本显示、配置生成)
- 添加 internal/config 包测试(加载、保存、验证、默认值)
- 更新 docs/plan.md 日志系统设计(选用 zerolog)
- 更新 .gitignore 添加 coverage.html
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-04-02 14:40:56 +08:00 |
|
|
|
f3e5aad21e
|
feat(app): 添加信号处理和完善配置结构
- 添加 SIGTERM/SIGINT/SIGQUIT 信号处理和优雅停止逻辑
- 完善安全配置:访问控制、速率限制、认证参数
- 完善性能配置:Goroutine 池、连接限制
- 改进配置生成 YAML 格式和注释说明
- 添加编译产物 lolly 到 gitignore
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-04-02 14:30:24 +08:00 |
|
|
|
77b0eccf4c
|
refactor(app): 将应用逻辑抽取到 internal/app 包
将版本信息和核心运行逻辑从 main.go 移至 internal/app/app.go,
main.go 仅保留 CLI 参数解析和入口调用。
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-04-02 14:12:06 +08:00 |
|
|
|
a265597d14
|
feat(config): 实现配置加载模块和 CLI 参数解析
- 添加 internal/config 包,包含配置结构定义、默认值和验证逻辑
- 实现 CLI 参数解析 (-c/--config, -v, --generate-config)
- 添加 yaml.v3 依赖用于配置文件解析
- 简化 plan.md 中的配置测试示例
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-04-02 14:07:08 +08:00 |
|