完成数据过主干逻辑,细节健壮性有待继续完善 #4
@ -35,11 +35,12 @@ type FilterDataRule struct {
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 2022/1/22 9:50 PM
|
||||
func NewDataFilter(source string, filterRule []*FilterDataRule) *DataFilter {
|
||||
func NewDataFilter(source string, filterRule []*FilterDataRule, debugMode bool) *DataFilter {
|
||||
return &DataFilter{
|
||||
source: source,
|
||||
filterRule: filterRule,
|
||||
rewriteResult: "{}",
|
||||
debugMode: debugMode,
|
||||
}
|
||||
}
|
||||
|
||||
@ -52,6 +53,7 @@ type DataFilter struct {
|
||||
source string
|
||||
filterRule []*FilterDataRule
|
||||
rewriteResult string // json数据重写结果
|
||||
debugMode bool // 调试模式
|
||||
}
|
||||
|
||||
// Filter 数据过滤
|
||||
|
Loading…
Reference in New Issue
Block a user