File tree Expand file tree Collapse file tree 1 file changed +0
-6
lines changed Expand file tree Collapse file tree 1 file changed +0
-6
lines changed Original file line number Diff line number Diff line change @@ -2823,22 +2823,16 @@ func isWeekend(fl FieldLevel) bool {
2823
2823
kind := field .Kind ()
2824
2824
param := fl .Param ()
2825
2825
2826
- fmt .Println ("param" , param )
2827
- fmt .Println ("field" , field .String ())
2828
-
2829
2826
if kind == reflect .String {
2830
- fmt .Println ("reflect" , "string" )
2831
2827
parsedTime , err := time .Parse (param , field .String ())
2832
2828
if err != nil {
2833
2829
panic (fmt .Sprintf ("Bad time format: %s" , err ))
2834
2830
}
2835
2831
weekday := parsedTime .Weekday ()
2836
- fmt .Println ("weekday" , weekday )
2837
2832
return weekday == time .Saturday || weekday == time .Sunday
2838
2833
}
2839
2834
2840
2835
if kind == reflect .Struct {
2841
- fmt .Println ("reflect" , "struct" )
2842
2836
if field .Type ().ConvertibleTo (timeType ) {
2843
2837
weekday := field .Convert (timeType ).Interface ().(time.Time ).Weekday ()
2844
2838
return weekday == time .Saturday || weekday == time .Sunday
You can’t perform that action at this time.
0 commit comments