[feat] 重新梳理导出

This commit is contained in:
2024-05-09 09:26:57 +08:00
parent 50a0a1a85c
commit e54629237c
8 changed files with 74 additions and 151 deletions
+2 -2
View File
@@ -6,7 +6,7 @@ import (
"reflect"
"strings"
"git.fsdpf.net/go/condition/contracts"
"git.fsdpf.net/go/condition"
"git.fsdpf.net/go/db"
"git.fsdpf.net/go/req"
"github.com/samber/lo"
@@ -48,7 +48,7 @@ func (this *Engine[T]) SetGlobalParams(g req.GlobalParams) *Engine[T] {
return this
}
func (this *Engine[T]) Case(cond contracts.Condition, cb func(data T, g req.GlobalParams) error) *Engine[T] {
func (this *Engine[T]) Case(cond *condition.Condition, cb func(data T, g req.GlobalParams) error) *Engine[T] {
this.predicates = append(this.predicates, &EngineCase[T]{cond, cb})
return this
}