Skip to content

Commit e7ab66a

Browse files
authored
remove unnecessary loop (#501)
1 parent 9b18a23 commit e7ab66a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

checker/types.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ func fetchField(t reflect.Type, name string) (reflect.StructField, bool) {
193193
anon := t.Field(i)
194194
if anon.Anonymous {
195195
anonType := anon.Type
196-
for anonType.Kind() == reflect.Pointer {
196+
if anonType.Kind() == reflect.Pointer {
197197
anonType = anonType.Elem()
198198
}
199199
if field, ok := fetchField(anonType, name); ok {

0 commit comments

Comments
 (0)