支持调试模式

This commit is contained in:
白茶清欢 2023-09-01 17:58:11 +08:00
parent f802550a49
commit e6c97685e7

View File

@ -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 数据过滤