func (x *ComplexErrorParam) VDLRead(dec vdl.Decoder) error { *x = ComplexErrorParam{} if err := dec.StartValue(__VDLType_struct_1); err != nil { return err } decType := dec.Type() for { index, err := dec.NextField() switch { case err != nil: return err case index == -1: return dec.FinishValue() } if decType != __VDLType_struct_1 { index = __VDLType_struct_1.FieldIndexByName(decType.Field(index).Name) if index == -1 { if err := dec.SkipValue(); err != nil { return err } continue } } switch index { case 0: switch value, err := dec.ReadValueString(); { case err != nil: return err default: x.Str = value } case 1: switch value, err := dec.ReadValueInt(32); { case err != nil: return err default: x.Num = int32(value) } case 2: if err := __VDLReadAnon_list_1(dec, &x.List); err != nil { return err } } } }
func __VDLReadAnon_list_1(dec vdl.Decoder, x *[]uint32) error { if err := dec.StartValue(__VDLType_list_2); err != nil { return err } if len := dec.LenHint(); len > 0 { *x = make([]uint32, 0, len) } else { *x = nil } for { switch done, elem, err := dec.NextEntryValueUint(32); { case err != nil: return err case done: return dec.FinishValue() default: *x = append(*x, uint32(elem)) } } }