File tree 2 files changed +16
-13
lines changed 2 files changed +16
-13
lines changed Original file line number Diff line number Diff line change @@ -26,12 +26,6 @@ TakePointerValue: //取指针的值
26
26
}
27
27
}
28
28
29
- if valueOf .CanConvert (timeTypes ) { //是time.Time类型或者底层是time.Time类型
30
- t .Key = key
31
- t .Val = valueOf .Interface ()
32
- return
33
- }
34
-
35
29
if typeOf .NumField () == 0 { //如果是一个struct{}{}类型的字段或者是一个空的自定义结构体编码为{}
36
30
t .Key = key
37
31
t .Val = struct {}{}
@@ -82,6 +76,11 @@ TakePointerValue: //取指针的值
82
76
continue
83
77
}
84
78
}
79
+ if valueOf .CanConvert (timeTypes ) { //是time.Time类型或者底层是time.Time类型
80
+ t .Key = key
81
+ t .Val = valueOf .Interface ()
82
+ return
83
+ }
85
84
86
85
tree .ParseOmitValue (tag .UseFieldName , omitScene , value .Interface ())
87
86
Original file line number Diff line number Diff line change 1
1
package filter
2
2
3
3
import (
4
- "fmt"
5
4
"reflect"
6
5
"time"
7
6
)
@@ -34,12 +33,11 @@ TakePointerValue: //取指针的值
34
33
}
35
34
}
36
35
37
- fmt .Println (valueOf .CanConvert (timeTypes ))
38
- if valueOf .CanConvert (timeTypes ) { //是time.Time类型或者底层是time.Time类型
39
- t .Key = key
40
- t .Val = valueOf .Interface ()
41
- return
42
- }
36
+ //if valueOf.CanConvert(timeTypes) { //是time.Time类型或者底层是time.Time类型
37
+ // t.Key = key
38
+ // t.Val = valueOf.Interface()
39
+ // return
40
+ //}
43
41
44
42
if typeOf .NumField () == 0 { //如果是一个struct{}{}类型的字段或者是一个空的自定义结构体编码为{}
45
43
t .Key = key
@@ -92,6 +90,12 @@ TakePointerValue: //取指针的值
92
90
continue
93
91
}
94
92
}
93
+
94
+ if valueOf .CanConvert (timeTypes ) { //是time.Time类型或者底层是time.Time类型
95
+ t .Key = key
96
+ t .Val = valueOf .Interface ()
97
+ return
98
+ }
95
99
tree .ParseSelectValue (tag .UseFieldName , selectScene , value .Interface ())
96
100
97
101
if t .IsAnonymous {
You can’t perform that action at this time.
0 commit comments