@@ -945,7 +945,6 @@ func isNeField(fl FieldLevel) bool {
945945 }
946946
947947 switch kind {
948-
949948 case reflect .Int , reflect .Int8 , reflect .Int16 , reflect .Int32 , reflect .Int64 :
950949 return field .Int () != currentField .Int ()
951950
@@ -966,7 +965,6 @@ func isNeField(fl FieldLevel) bool {
966965 fieldType := field .Type ()
967966
968967 if fieldType .ConvertibleTo (timeType ) && currentField .Type ().ConvertibleTo (timeType ) {
969-
970968 t := currentField .Interface ().(time.Time )
971969 fieldTime := field .Interface ().(time.Time )
972970
@@ -1005,7 +1003,6 @@ func isLteCrossStructField(fl FieldLevel) bool {
10051003 }
10061004
10071005 switch kind {
1008-
10091006 case reflect .Int , reflect .Int8 , reflect .Int16 , reflect .Int32 , reflect .Int64 :
10101007 return field .Int () <= topField .Int ()
10111008
@@ -1023,7 +1020,6 @@ func isLteCrossStructField(fl FieldLevel) bool {
10231020 fieldType := field .Type ()
10241021
10251022 if fieldType .ConvertibleTo (timeType ) && topField .Type ().ConvertibleTo (timeType ) {
1026-
10271023 fieldTime := field .Convert (timeType ).Interface ().(time.Time )
10281024 topTime := topField .Convert (timeType ).Interface ().(time.Time )
10291025
@@ -1052,7 +1048,6 @@ func isLtCrossStructField(fl FieldLevel) bool {
10521048 }
10531049
10541050 switch kind {
1055-
10561051 case reflect .Int , reflect .Int8 , reflect .Int16 , reflect .Int32 , reflect .Int64 :
10571052 return field .Int () < topField .Int ()
10581053
@@ -1070,7 +1065,6 @@ func isLtCrossStructField(fl FieldLevel) bool {
10701065 fieldType := field .Type ()
10711066
10721067 if fieldType .ConvertibleTo (timeType ) && topField .Type ().ConvertibleTo (timeType ) {
1073-
10741068 fieldTime := field .Convert (timeType ).Interface ().(time.Time )
10751069 topTime := topField .Convert (timeType ).Interface ().(time.Time )
10761070
@@ -1098,7 +1092,6 @@ func isGteCrossStructField(fl FieldLevel) bool {
10981092 }
10991093
11001094 switch kind {
1101-
11021095 case reflect .Int , reflect .Int8 , reflect .Int16 , reflect .Int32 , reflect .Int64 :
11031096 return field .Int () >= topField .Int ()
11041097
@@ -1116,7 +1109,6 @@ func isGteCrossStructField(fl FieldLevel) bool {
11161109 fieldType := field .Type ()
11171110
11181111 if fieldType .ConvertibleTo (timeType ) && topField .Type ().ConvertibleTo (timeType ) {
1119-
11201112 fieldTime := field .Convert (timeType ).Interface ().(time.Time )
11211113 topTime := topField .Convert (timeType ).Interface ().(time.Time )
11221114
@@ -1144,7 +1136,6 @@ func isGtCrossStructField(fl FieldLevel) bool {
11441136 }
11451137
11461138 switch kind {
1147-
11481139 case reflect .Int , reflect .Int8 , reflect .Int16 , reflect .Int32 , reflect .Int64 :
11491140 return field .Int () > topField .Int ()
11501141
@@ -1162,7 +1153,6 @@ func isGtCrossStructField(fl FieldLevel) bool {
11621153 fieldType := field .Type ()
11631154
11641155 if fieldType .ConvertibleTo (timeType ) && topField .Type ().ConvertibleTo (timeType ) {
1165-
11661156 fieldTime := field .Convert (timeType ).Interface ().(time.Time )
11671157 topTime := topField .Convert (timeType ).Interface ().(time.Time )
11681158
@@ -1190,7 +1180,6 @@ func isNeCrossStructField(fl FieldLevel) bool {
11901180 }
11911181
11921182 switch kind {
1193-
11941183 case reflect .Int , reflect .Int8 , reflect .Int16 , reflect .Int32 , reflect .Int64 :
11951184 return topField .Int () != field .Int ()
11961185
@@ -1211,7 +1200,6 @@ func isNeCrossStructField(fl FieldLevel) bool {
12111200 fieldType := field .Type ()
12121201
12131202 if fieldType .ConvertibleTo (timeType ) && topField .Type ().ConvertibleTo (timeType ) {
1214-
12151203 t := field .Convert (timeType ).Interface ().(time.Time )
12161204 fieldTime := topField .Convert (timeType ).Interface ().(time.Time )
12171205
@@ -1239,7 +1227,6 @@ func isEqCrossStructField(fl FieldLevel) bool {
12391227 }
12401228
12411229 switch kind {
1242-
12431230 case reflect .Int , reflect .Int8 , reflect .Int16 , reflect .Int32 , reflect .Int64 :
12441231 return topField .Int () == field .Int ()
12451232
@@ -1260,7 +1247,6 @@ func isEqCrossStructField(fl FieldLevel) bool {
12601247 fieldType := field .Type ()
12611248
12621249 if fieldType .ConvertibleTo (timeType ) && topField .Type ().ConvertibleTo (timeType ) {
1263-
12641250 t := field .Convert (timeType ).Interface ().(time.Time )
12651251 fieldTime := topField .Convert (timeType ).Interface ().(time.Time )
12661252
@@ -1288,7 +1274,6 @@ func isEqField(fl FieldLevel) bool {
12881274 }
12891275
12901276 switch kind {
1291-
12921277 case reflect .Int , reflect .Int8 , reflect .Int16 , reflect .Int32 , reflect .Int64 :
12931278 return field .Int () == currentField .Int ()
12941279
@@ -1309,7 +1294,6 @@ func isEqField(fl FieldLevel) bool {
13091294 fieldType := field .Type ()
13101295
13111296 if fieldType .ConvertibleTo (timeType ) && currentField .Type ().ConvertibleTo (timeType ) {
1312-
13131297 t := currentField .Convert (timeType ).Interface ().(time.Time )
13141298 fieldTime := field .Convert (timeType ).Interface ().(time.Time )
13151299
@@ -1332,7 +1316,6 @@ func isEq(fl FieldLevel) bool {
13321316 param := fl .Param ()
13331317
13341318 switch field .Kind () {
1335-
13361319 case reflect .String :
13371320 return field .String () == param
13381321
@@ -1851,7 +1834,6 @@ func requireCheckFieldValue(
18511834 }
18521835
18531836 switch kind {
1854-
18551837 case reflect .Int , reflect .Int8 , reflect .Int16 , reflect .Int32 , reflect .Int64 :
18561838 return field .Int () == asInt (value )
18571839
@@ -2060,7 +2042,6 @@ func isGteField(fl FieldLevel) bool {
20602042 }
20612043
20622044 switch kind {
2063-
20642045 case reflect .Int , reflect .Int8 , reflect .Int16 , reflect .Int32 , reflect .Int64 :
20652046
20662047 return field .Int () >= currentField .Int ()
@@ -2078,7 +2059,6 @@ func isGteField(fl FieldLevel) bool {
20782059 fieldType := field .Type ()
20792060
20802061 if fieldType .ConvertibleTo (timeType ) && currentField .Type ().ConvertibleTo (timeType ) {
2081-
20822062 t := currentField .Convert (timeType ).Interface ().(time.Time )
20832063 fieldTime := field .Convert (timeType ).Interface ().(time.Time )
20842064
@@ -2106,7 +2086,6 @@ func isGtField(fl FieldLevel) bool {
21062086 }
21072087
21082088 switch kind {
2109-
21102089 case reflect .Int , reflect .Int8 , reflect .Int16 , reflect .Int32 , reflect .Int64 :
21112090
21122091 return field .Int () > currentField .Int ()
@@ -2124,7 +2103,6 @@ func isGtField(fl FieldLevel) bool {
21242103 fieldType := field .Type ()
21252104
21262105 if fieldType .ConvertibleTo (timeType ) && currentField .Type ().ConvertibleTo (timeType ) {
2127-
21282106 t := currentField .Convert (timeType ).Interface ().(time.Time )
21292107 fieldTime := field .Convert (timeType ).Interface ().(time.Time )
21302108
@@ -2147,7 +2125,6 @@ func isGte(fl FieldLevel) bool {
21472125 param := fl .Param ()
21482126
21492127 switch field .Kind () {
2150-
21512128 case reflect .String :
21522129 p := asInt (param )
21532130
@@ -2181,7 +2158,6 @@ func isGte(fl FieldLevel) bool {
21812158 case reflect .Struct :
21822159
21832160 if field .Type ().ConvertibleTo (timeType ) {
2184-
21852161 now := time .Now ().UTC ()
21862162 t := field .Convert (timeType ).Interface ().(time.Time )
21872163
@@ -2198,7 +2174,6 @@ func isGt(fl FieldLevel) bool {
21982174 param := fl .Param ()
21992175
22002176 switch field .Kind () {
2201-
22022177 case reflect .String :
22032178 p := asInt (param )
22042179
@@ -2245,7 +2220,6 @@ func hasLengthOf(fl FieldLevel) bool {
22452220 param := fl .Param ()
22462221
22472222 switch field .Kind () {
2248-
22492223 case reflect .String :
22502224 p := asInt (param )
22512225
@@ -2296,7 +2270,6 @@ func isLteField(fl FieldLevel) bool {
22962270 }
22972271
22982272 switch kind {
2299-
23002273 case reflect .Int , reflect .Int8 , reflect .Int16 , reflect .Int32 , reflect .Int64 :
23012274
23022275 return field .Int () <= currentField .Int ()
@@ -2314,7 +2287,6 @@ func isLteField(fl FieldLevel) bool {
23142287 fieldType := field .Type ()
23152288
23162289 if fieldType .ConvertibleTo (timeType ) && currentField .Type ().ConvertibleTo (timeType ) {
2317-
23182290 t := currentField .Convert (timeType ).Interface ().(time.Time )
23192291 fieldTime := field .Convert (timeType ).Interface ().(time.Time )
23202292
@@ -2342,7 +2314,6 @@ func isLtField(fl FieldLevel) bool {
23422314 }
23432315
23442316 switch kind {
2345-
23462317 case reflect .Int , reflect .Int8 , reflect .Int16 , reflect .Int32 , reflect .Int64 :
23472318
23482319 return field .Int () < currentField .Int ()
@@ -2360,7 +2331,6 @@ func isLtField(fl FieldLevel) bool {
23602331 fieldType := field .Type ()
23612332
23622333 if fieldType .ConvertibleTo (timeType ) && currentField .Type ().ConvertibleTo (timeType ) {
2363-
23642334 t := currentField .Convert (timeType ).Interface ().(time.Time )
23652335 fieldTime := field .Convert (timeType ).Interface ().(time.Time )
23662336
@@ -2383,7 +2353,6 @@ func isLte(fl FieldLevel) bool {
23832353 param := fl .Param ()
23842354
23852355 switch field .Kind () {
2386-
23872356 case reflect .String :
23882357 p := asInt (param )
23892358
@@ -2417,7 +2386,6 @@ func isLte(fl FieldLevel) bool {
24172386 case reflect .Struct :
24182387
24192388 if field .Type ().ConvertibleTo (timeType ) {
2420-
24212389 now := time .Now ().UTC ()
24222390 t := field .Convert (timeType ).Interface ().(time.Time )
24232391
@@ -2434,7 +2402,6 @@ func isLt(fl FieldLevel) bool {
24342402 param := fl .Param ()
24352403
24362404 switch field .Kind () {
2437-
24382405 case reflect .String :
24392406 p := asInt (param )
24402407
0 commit comments