Closed rcoreilly closed 1 week ago
// cacheVisibleFields caches the visible struct fields. func (tb *Table) cacheVisibleFields() { tb.visibleFields = make([]reflect.StructField, 0) ... reflectx.WalkFields(tb.ElementValue, func(parent reflect.Value, field reflect.StructField, value reflect.Value) bool { return shouldShow(field) }, func(parent reflect.Value, field reflect.StructField, value reflect.Value) { tb.visibleFields = append(tb.visibleFields, field) }) ... for fli := 0; fli < tb.numVisibleFields; fli++ { field := tb.visibleFields[fli] uvp := reflectx.UnderlyingPointer(val.FieldByIndex(field.Index)) ...
The field.Index is relative to its direct parent, not the final parent which embeds others. need to also add a test for this presumably.
emer/axon/ view recv prjns for example.
No response
macOS
fixed in ba92f2403a8b63b2542354fead7ae16b0b017c8b
Describe the bug
The field.Index is relative to its direct parent, not the final parent which embeds others. need to also add a test for this presumably.
How to reproduce
emer/axon/ view recv prjns for example.
Example code
No response
Relevant output
No response
Platform
macOS