ignore unexported fields in yaml lint (#3145)

This commit is contained in:
Paul Wells
2024-10-29 12:16:21 -07:00
committed by GitHub
parent 526985f109
commit 24f3c93204
+5
View File
@@ -31,6 +31,11 @@ func checkYAMLTags(t reflect.Type, seen map[reflect.Type]struct{}) error {
for i := 0; i < t.NumField(); i++ {
field := t.Field(i)
if !field.IsExported() {
// ignore unexported fields
continue
}
if field.Type.Kind() == reflect.Bool {
// ignore boolean fields
continue