@@ -42,7 +42,7 @@ func (f Filter) String() string {
42
42
return json
43
43
}
44
44
45
- // SelectMarshal 第一个参数填你结构体select标签里的场景,第二个参数是你需要过滤的结构体对象,如果字段的select标签里标注的有该场景那么该字段会被选中。
45
+ // SelectMarshal 不建议使用, 第一个参数填你结构体select标签里的场景,第二个参数是你需要过滤的结构体对象,如果字段的select标签里标注的有该场景那么该字段会被选中。
46
46
func SelectMarshal (selectScene string , el interface {}) Filter {
47
47
if enableCache {
48
48
return selectWithCache (selectScene , el )
@@ -63,9 +63,9 @@ func selectMarshal(selectScene string, el interface{}) Filter {
63
63
// Select 直接返回过滤后的数据结构,相当于直接SelectMarshal后再调用Interface方法
64
64
func Select (selectScene string , el interface {}) interface {} {
65
65
if enableCache {
66
- return selectWithCache (selectScene , el ). Interface ()
66
+ return selectWithCache (selectScene , el )
67
67
}
68
- return selectMarshal (selectScene , el ). Interface ()
68
+ return selectMarshal (selectScene , el )
69
69
}
70
70
71
71
// selectWithCache 直接返回过滤后的数据结构,相当于直接SelectMarshal后再调用Interface方法
@@ -83,12 +83,12 @@ func selectWithCache(selectScene string, el interface{}) Filter {
83
83
// Omit 直接返回过滤后的数据结构,相当于直接OmitMarshal后再调用Interface方法
84
84
func Omit (omitScene string , el interface {}) interface {} {
85
85
if enableCache {
86
- return omitWithCache (omitScene , el ). Interface ()
86
+ return omitWithCache (omitScene , el )
87
87
}
88
- return omitMarshal (omitScene , el ). Interface ()
88
+ return omitMarshal (omitScene , el )
89
89
}
90
90
91
- // OmitMarshal 第一个参数填你结构体omit标签里的场景,第二个参数是你需要过滤的结构体对象,如果字段的omit标签里标注的有该场景那么该字段会被过滤掉
91
+ // OmitMarshal 不建议使用, 第一个参数填你结构体omit标签里的场景,第二个参数是你需要过滤的结构体对象,如果字段的omit标签里标注的有该场景那么该字段会被过滤掉
92
92
func OmitMarshal (omitScene string , el interface {}) Filter {
93
93
if enableCache {
94
94
return omitWithCache (omitScene , el )
0 commit comments