当前位置: 首页>>代码示例>>Golang>>正文


Golang TProtocol.ReadListEnd方法代码示例

本文整理汇总了Golang中github.com/apesternikov/thrift4go/lib/go/src/thrift.TProtocol.ReadListEnd方法的典型用法代码示例。如果您正苦于以下问题:Golang TProtocol.ReadListEnd方法的具体用法?Golang TProtocol.ReadListEnd怎么用?Golang TProtocol.ReadListEnd使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在github.com/apesternikov/thrift4go/lib/go/src/thrift.TProtocol的用法示例。


在下文中一共展示了TProtocol.ReadListEnd方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1: readField6

func (p *Manylists) readField6(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	_etype62, _size59, err := iprot.ReadListBegin()
	if err != nil {
		return thrift.NewTProtocolExceptionReadField(-1, "p.Listoflist", "", err)
	}
	_ = _etype62
	p.Listoflist = make([][]int32, _size59, _size59)
	for i := 0; i < _size59; i++ {
		_etype70, _size67, err := iprot.ReadListBegin()
		if err != nil {
			return thrift.NewTProtocolExceptionReadField(-1, "_elem64", "", err)
		}
		_ = _etype70
		_elem64 := make([]int32, _size67, _size67)
		for i := 0; i < _size67; i++ {
			v73, err74 := iprot.ReadI32()
			if err74 != nil {
				return thrift.NewTProtocolExceptionReadField(0, "_elem72", "", err74)
			}
			_elem72 := v73
			_elem64[i] = _elem72
		}
		err = iprot.ReadListEnd()
		if err != nil {
			return thrift.NewTProtocolExceptionReadField(-1, "", "list", err)
		}
		p.Listoflist[i] = _elem64
	}
	err = iprot.ReadListEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionReadField(-1, "", "list", err)
	}
	return err
}
开发者ID:mohanarpit,项目名称:goh,代码行数:34,代码来源:ttypes.go

示例2: readField5

func (p *Manylists) readField5(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	_etype51, _size48, err := iprot.ReadListBegin()
	if err != nil {
		return thrift.NewTProtocolExceptionReadField(-1, "p.Structlist", "", err)
	}
	_ = _etype51
	p.Structlist = make([]*Intstruct, _size48, _size48)
	for i := 0; i < _size48; i++ {
		_elem53 := NewIntstruct()
		err56 := _elem53.Read(iprot)
		if err56 != nil {
			return thrift.NewTProtocolExceptionReadStruct("_elem53intstruct", err56)
		}
		p.Structlist[i] = _elem53
	}
	err = iprot.ReadListEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionReadField(-1, "", "list", err)
	}
	return err
}
开发者ID:mohanarpit,项目名称:goh,代码行数:21,代码来源:ttypes.go

示例3: readField4

func (p *Manylists) readField4(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	_etype41, _size38, err := iprot.ReadListBegin()
	if err != nil {
		return thrift.NewTProtocolExceptionReadField(-1, "p.Stringlist", "", err)
	}
	_ = _etype41
	p.Stringlist = make([]string, _size38, _size38)
	for i := 0; i < _size38; i++ {
		v44, err45 := iprot.ReadString()
		if err45 != nil {
			return thrift.NewTProtocolExceptionReadField(0, "_elem43", "", err45)
		}
		_elem43 := v44
		p.Stringlist[i] = _elem43
	}
	err = iprot.ReadListEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionReadField(-1, "", "list", err)
	}
	return err
}
开发者ID:mohanarpit,项目名称:goh,代码行数:21,代码来源:ttypes.go

示例4: readField3

func (p *Manylists) readField3(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	_etype31, _size28, err := iprot.ReadListBegin()
	if err != nil {
		return thrift.NewTProtocolExceptionReadField(-1, "p.I32list", "", err)
	}
	_ = _etype31
	p.I32list = make([]int32, _size28, _size28)
	for i := 0; i < _size28; i++ {
		v34, err35 := iprot.ReadI32()
		if err35 != nil {
			return thrift.NewTProtocolExceptionReadField(0, "_elem33", "", err35)
		}
		_elem33 := v34
		p.I32list[i] = _elem33
	}
	err = iprot.ReadListEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionReadField(-1, "", "list", err)
	}
	return err
}
开发者ID:mohanarpit,项目名称:goh,代码行数:21,代码来源:ttypes.go

示例5: readField2

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
}
开发者ID:mohanarpit,项目名称:goh,代码行数:21,代码来源:ttypes.go

示例6: readField1

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
}
开发者ID:mohanarpit,项目名称:goh,代码行数:21,代码来源:ttypes.go


注:本文中的github.com/apesternikov/thrift4go/lib/go/src/thrift.TProtocol.ReadListEnd方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。