Ejemplo n.º 1
0
func (p *Manymaps) readField1(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	_ktype5, _vtype6, _size4, err := iprot.ReadMapBegin()
	if err != nil {
		return thrift.NewTProtocolExceptionReadField(-1, "p.Bytemap", "", err)
	}
	_, _ = _ktype5, _vtype6
	p.Bytemap = make(map[int8]string, _size4)
	for i := 0; i < _size4; i++ {
		v11, err12 := iprot.ReadByte()
		if err12 != nil {
			return thrift.NewTProtocolExceptionReadField(0, "_key9", "", err12)
		}
		_key9 := v11
		v13, err14 := iprot.ReadString()
		if err14 != nil {
			return thrift.NewTProtocolExceptionReadField(0, "_val10", "", err14)
		}
		_val10 := v13
		p.Bytemap[_key9] = _val10
	}
	err = iprot.ReadMapEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionReadField(-1, "", "map", err)
	}
	return err
}
Ejemplo n.º 2
0
func (p *Manylists) readField1(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	_etype11, _size8, err := iprot.ReadListBegin()
	if err != nil {
		return thrift.NewTProtocolExceptionReadField(-1, "p.Bytelist", "", err)
	}
	_ = _etype11
	p.Bytelist = make([]int8, _size8, _size8)
	for i := 0; i < _size8; i++ {
		v14, err15 := iprot.ReadByte()
		if err15 != nil {
			return thrift.NewTProtocolExceptionReadField(0, "_elem13", "", err15)
		}
		_elem13 := v14
		p.Bytelist[i] = _elem13
	}
	err = iprot.ReadListEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionReadField(-1, "", "list", err)
	}
	return err
}