This commit is contained in:
eshan jogwar 2025-06-20 01:00:17 +05:30
parent 842ee527eb
commit b4ef04e236

View File

@ -457,7 +457,7 @@ func (field *Field) setupValuerAndSetter() {
switch {
case len(field.StructField.Index) == 1 && fieldIndex > 0:
field.ValueOf = func(ctx context.Context, value reflect.Value) (interface{}, bool) {
fieldValue := reflect.Indirect(value).Field(fieldIndex)
fieldValue := reflect.Indirect(value).FieldByName(field.Name)
return fieldValue.Interface(), fieldValue.IsZero()
}
default: