countOverrides recursively counts the number of non-struct fields in a struct.
(v any)
| 250 | |
| 251 | // countOverrides recursively counts the number of non-struct fields in a struct. |
| 252 | func countOverrides(v any) int { |
| 253 | return rvCountFields(reflect.ValueOf(v)) |
| 254 | } |
| 255 | |
| 256 | func rvCountFields(rv reflect.Value) int { |
| 257 | if rv.Kind() != reflect.Struct { |
no test coverage detected