Merge pull request #86618 from yutedz/fld-info-empty

Come out of loop when omitempty is true
This commit is contained in:
Kubernetes Prow Robot 2019-12-30 07:53:40 -08:00 committed by GitHub
commit e94f2b5642
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -256,6 +256,7 @@ func fieldInfoFromField(structType reflect.Type, field int) *fieldInfo {
for i := range items {
if items[i] == "omitempty" {
info.omitempty = true
break
}
}
}