feat(util/gexecutor): add new generic executor #4654
+917
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix: #4624
本次 PR 新增了
gexecutor组件,这是一个通用的执行器工具,用于简化函数执行流程的管理:✨ 新增功能
RWithBefore、WithMain、WithAfter链式配置ErrMainFuncNotSet错误定义🧪 测试覆盖
WithBefore测试WithAfter测试WithXxx方法返回新实例的特性,支持安全的执行器模板复用🔧 设计亮点
WithXxx调用返回新实例,不影响原始实例,支持模板复用WithXxx方法都是可选的,可根据需要灵活组合使用💡 使用场景