Rogee
e1f83ae469
feat: 重构 pkg/ast/provider 模块,优化代码组织逻辑和功能实现
...
## 主要改进
### 架构重构
- 将单体 provider.go 拆分为多个专门的模块文件
- 实现了清晰的职责分离和模块化设计
- 遵循 SOLID 原则,提高代码可维护性
### 新增功能
- **验证规则系统**: 实现了完整的 provider 验证框架
- **报告生成器**: 支持多种格式的验证报告 (JSON/HTML/Markdown/Text)
- **解析器优化**: 重新设计了解析流程,提高性能和可扩展性
- **错误处理**: 增强了错误处理和诊断能力
### 修复关键 Bug
- 修复 @provider(job) 注解缺失 __job 注入参数的问题
- 统一了 job 和 cronjob 模式的处理逻辑
- 确保了 provider 生成的正确性和一致性
### 代码质量提升
- 添加了完整的测试套件
- 引入了 golangci-lint 代码质量检查
- 优化了代码格式和结构
- 增加了详细的文档和规范
### 文件结构优化
```
pkg/ast/provider/
├── types.go # 类型定义
├── parser.go # 解析器实现
├── validator.go # 验证规则
├── report_generator.go # 报告生成
├── renderer.go # 渲染器
├── comment_parser.go # 注解解析
├── modes.go # 模式定义
├── errors.go # 错误处理
└── validator_test.go # 测试文件
```
### 兼容性
- 保持向后兼容性
- 支持现有的所有 provider 模式
- 优化了 API 设计和用户体验
This completes the implementation of T025-T029 tasks following TDD principles,
including validation rules implementation and critical bug fixes.
2025-09-19 18:58:30 +08:00
Rogee
342f205b5e
feat(tracing): Implement Jaeger/OpenTracing provider with configuration options
...
- Added Punycode encoding implementation for cookie handling.
- Introduced serialization for cookie jar with JSON support.
- Created a comprehensive README for the tracing provider, detailing configuration and usage.
- Developed a configuration structure for tracing, including sampler and reporter settings.
- Implemented the provider logic to initialize Jaeger tracer with logging capabilities.
- Ensured graceful shutdown of the tracer on application exit.
2025-09-12 17:28:25 +08:00
Rogee
ee15e0932a
feat: 增强命令帮助文档,添加详细说明和示例
2025-09-12 10:33:57 +08:00
Rogee
0d05d70fb1
feat: 更新模块路径为 v2,修正文档和代码中的相关引用
2025-09-10 14:54:16 +08:00
Rogee
3b804b83da
feat: 增加命令行工具的干运行模式和输出目录选项
2025-09-10 14:30:16 +08:00
Rogee
0a420a2987
feat: modify pkg name
2025-02-11 15:38:59 +08:00
Rogee
2f2feb35c2
feat: new provider command
2024-12-23 18:03:40 +08:00