Exemple #1
0
func (p *Manymaps) readField2(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	_ktype18, _vtype19, _size17, err := iprot.ReadMapBegin()
	if err != nil {
		return thrift.NewTProtocolExceptionReadField(-1, "p.I16map", "", err)
	}
	_, _ = _ktype18, _vtype19
	p.I16map = make(map[int16]string, _size17)
	for i := 0; i < _size17; i++ {
		v24, err25 := iprot.ReadI16()
		if err25 != nil {
			return thrift.NewTProtocolExceptionReadField(0, "_key22", "", err25)
		}
		_key22 := v24
		v26, err27 := iprot.ReadString()
		if err27 != nil {
			return thrift.NewTProtocolExceptionReadField(0, "_val23", "", err27)
		}
		_val23 := v26
		p.I16map[_key22] = _val23
	}
	err = iprot.ReadMapEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionReadField(-1, "", "map", err)
	}
	return err
}
func (p *MyMethodArgs) readField3(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v1121, err1122 := iprot.ReadI16()
	if err1122 != nil {
		return thrift.NewTProtocolExceptionReadField(3, "second", p.ThriftName(), err1122)
	}
	p.Second = v1121
	return err
}
Exemple #3
0
func (p *Manylists) readField2(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	_etype21, _size18, err := iprot.ReadListBegin()
	if err != nil {
		return thrift.NewTProtocolExceptionReadField(-1, "p.I16list", "", err)
	}
	_ = _etype21
	p.I16list = make([]int16, _size18, _size18)
	for i := 0; i < _size18; i++ {
		v24, err25 := iprot.ReadI16()
		if err25 != nil {
			return thrift.NewTProtocolExceptionReadField(0, "_elem23", "", err25)
		}
		_elem23 := v24
		p.I16list[i] = _elem23
	}
	err = iprot.ReadListEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionReadField(-1, "", "list", err)
	}
	return err
}