1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-17 18:07:01 +00:00
This commit is contained in:
Gerasimos (Makis) Maropoulos
2022-03-08 00:43:40 +02:00
parent 4ecc9e3831
commit ad80a14b8f
3 changed files with 11 additions and 7 deletions

View File

@@ -174,10 +174,14 @@ func (r *Row) lookupStructFieldPtrs(typ reflect.Type, val reflect.Value, columnT
continue
}
tableColumnField, err := val.FieldByIndexErr(tableColumn.FieldIndex)
if err != nil {
return nil, fmt.Errorf("column: %q: %w", tableColumn.Name, err)
}
// TODO: when go 1.18 released, replace with that:
/*
tableColumnField, err := val.FieldByIndexErr(tableColumn.FieldIndex)
if err != nil {
return nil, fmt.Errorf("column: %q: %w", tableColumn.Name, err)
}
*/
tableColumnField := val.FieldByIndex(tableColumn.FieldIndex)
tableColumnFieldType := tableColumnField.Type()