diff --git a/tool/gabs.go b/tool/gabs.go index b70b261..356ec8d 100644 --- a/tool/gabs.go +++ b/tool/gabs.go @@ -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 数据过滤