remove redundant validity check
Xander Flood authored 5 years ago
William Martin committed 5 years ago
117 | 117 | return nil |
118 | 118 | } |
119 | 119 | |
120 | var field interface{} | |
121 | if val.Field(i).IsValid() { | |
122 | field = val.Field(i).Interface() | |
123 | } else { | |
124 | field = reflect.Zero(typ.Field(i).Type) | |
125 | } | |
120 | field := val.Field(i).Interface() | |
126 | 121 | |
127 | 122 | match, err := matcher.Match(field) |
128 | 123 | if err != nil { |