@@ -42,7 +42,7 @@ func (f Filter) String() string {
4242 return json
4343}
4444
45- // SelectMarshal 第一个参数填你结构体select标签里的场景,第二个参数是你需要过滤的结构体对象,如果字段的select标签里标注的有该场景那么该字段会被选中。
45+ // SelectMarshal 不建议使用, 第一个参数填你结构体select标签里的场景,第二个参数是你需要过滤的结构体对象,如果字段的select标签里标注的有该场景那么该字段会被选中。
4646func SelectMarshal (selectScene string , el interface {}) Filter {
4747 if enableCache {
4848 return selectWithCache (selectScene , el )
@@ -63,9 +63,9 @@ func selectMarshal(selectScene string, el interface{}) Filter {
6363// Select 直接返回过滤后的数据结构,相当于直接SelectMarshal后再调用Interface方法
6464func Select (selectScene string , el interface {}) interface {} {
6565 if enableCache {
66- return selectWithCache (selectScene , el ). Interface ()
66+ return selectWithCache (selectScene , el )
6767 }
68- return selectMarshal (selectScene , el ). Interface ()
68+ return selectMarshal (selectScene , el )
6969}
7070
7171// selectWithCache 直接返回过滤后的数据结构,相当于直接SelectMarshal后再调用Interface方法
@@ -83,12 +83,12 @@ func selectWithCache(selectScene string, el interface{}) Filter {
8383// Omit 直接返回过滤后的数据结构,相当于直接OmitMarshal后再调用Interface方法
8484func Omit (omitScene string , el interface {}) interface {} {
8585 if enableCache {
86- return omitWithCache (omitScene , el ). Interface ()
86+ return omitWithCache (omitScene , el )
8787 }
88- return omitMarshal (omitScene , el ). Interface ()
88+ return omitMarshal (omitScene , el )
8989}
9090
91- // OmitMarshal 第一个参数填你结构体omit标签里的场景,第二个参数是你需要过滤的结构体对象,如果字段的omit标签里标注的有该场景那么该字段会被过滤掉
91+ // OmitMarshal 不建议使用, 第一个参数填你结构体omit标签里的场景,第二个参数是你需要过滤的结构体对象,如果字段的omit标签里标注的有该场景那么该字段会被过滤掉
9292func OmitMarshal (omitScene string , el interface {}) Filter {
9393 if enableCache {
9494 return omitWithCache (omitScene , el )
0 commit comments