本文整理汇总了Golang中git/apache/org/thrift/git/lib/go/thrift.TProtocol.ReadListBegin方法的典型用法代码示例。如果您正苦于以下问题:Golang TProtocol.ReadListBegin方法的具体用法?Golang TProtocol.ReadListBegin怎么用?Golang TProtocol.ReadListBegin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类git/apache/org/thrift/git/lib/go/thrift.TProtocol
的用法示例。
在下文中一共展示了TProtocol.ReadListBegin方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: readField2
func (p *News) readField2(iprot thrift.TProtocol) error {
_, size, err := iprot.ReadListBegin()
if err != nil {
return fmt.Errorf("error reading list being: %s")
}
p.Articles = make([]*Article, 0, size)
for i := 0; i < size; i++ {
_elem0 := NewArticle()
if err := _elem0.Read(iprot); err != nil {
return fmt.Errorf("%T error reading struct: %s", _elem0)
}
p.Articles = append(p.Articles, _elem0)
}
if err := iprot.ReadListEnd(); err != nil {
return fmt.Errorf("error reading list end: %s")
}
return nil
}
示例2: readField5
func (p *QueryResult) readField5(iprot thrift.TProtocol) error {
_, size, err := iprot.ReadListBegin()
if err != nil {
return fmt.Errorf("error reading list being: %s")
}
p.VmMoneyList = make([]*VmMoney, 0, size)
for i := 0; i < size; i++ {
_elem0 := NewVmMoney()
if err := _elem0.Read(iprot); err != nil {
return fmt.Errorf("%T error reading struct: %s", _elem0)
}
p.VmMoneyList = append(p.VmMoneyList, _elem0)
}
if err := iprot.ReadListEnd(); err != nil {
return fmt.Errorf("error reading list end: %s")
}
return nil
}
示例3: readField1
func (p *PushNewsArgs) readField1(iprot thrift.TProtocol) error {
_, size, err := iprot.ReadListBegin()
if err != nil {
return fmt.Errorf("error reading list being: %s")
}
p.Data = make([]*News, 0, size)
for i := 0; i < size; i++ {
_elem12 := NewNews()
if err := _elem12.Read(iprot); err != nil {
return fmt.Errorf("%T error reading struct: %s", _elem12)
}
p.Data = append(p.Data, _elem12)
}
if err := iprot.ReadListEnd(); err != nil {
return fmt.Errorf("error reading list end: %s")
}
return nil
}
示例4: readField0
func (p *PullResult) readField0(iprot thrift.TProtocol) error {
_, size, err := iprot.ReadListBegin()
if err != nil {
return fmt.Errorf("error reading list being: %s")
}
p.Success = make([]*Data, 0, size)
for i := 0; i < size; i++ {
_elem6 := NewData()
if err := _elem6.Read(iprot); err != nil {
return fmt.Errorf("%T error reading struct: %s", _elem6)
}
p.Success = append(p.Success, _elem6)
}
if err := iprot.ReadListEnd(); err != nil {
return fmt.Errorf("error reading list end: %s")
}
return nil
}
示例5: readField1
func (p *AppendBatchArgs) readField1(iprot thrift.TProtocol) error {
_, size, err := iprot.ReadListBegin()
if err != nil {
return fmt.Errorf("error reading list being: %s")
}
p.Events = make([]*ThriftFlumeEvent, 0, size)
for i := 0; i < size; i++ {
_elem12 := NewThriftFlumeEvent()
if err := _elem12.Read(iprot); err != nil {
return fmt.Errorf("%T error reading struct: %s", _elem12)
}
p.Events = append(p.Events, _elem12)
}
if err := iprot.ReadListEnd(); err != nil {
return fmt.Errorf("error reading list end: %s")
}
return nil
}
示例6: ReadField0
func (p *FetchResult) ReadField0(iprot thrift.TProtocol) error {
_, size, err := iprot.ReadListBegin()
if err != nil {
return fmt.Errorf("error reading list begin: %s", err)
}
tSlice := make([]*User, 0, size)
p.Success = tSlice
for i := 0; i < size; i++ {
_elem14 := &User{}
if err := _elem14.Read(iprot); err != nil {
return fmt.Errorf("%T error reading struct: %s", _elem14, err)
}
p.Success = append(p.Success, _elem14)
}
if err := iprot.ReadListEnd(); err != nil {
return fmt.Errorf("error reading list end: %s", err)
}
return nil
}
示例7: ReadField1
func (p *GetChatMessagesArgs) ReadField1(iprot thrift.TProtocol) error {
_, size, err := iprot.ReadListBegin()
if err != nil {
return fmt.Errorf("error reading list begin: %s", err)
}
tSlice := make([]*entity.ChatMessage, 0, size)
p.Messages = tSlice
for i := 0; i < size; i++ {
_elem10 := &entity.ChatMessage{}
if err := _elem10.Read(iprot); err != nil {
return fmt.Errorf("%T error reading struct: %s", _elem10, err)
}
p.Messages = append(p.Messages, _elem10)
}
if err := iprot.ReadListEnd(); err != nil {
return fmt.Errorf("error reading list end: %s", err)
}
return nil
}
示例8: readField1
func (p *LogArgs) readField1(iprot thrift.TProtocol) error {
_, size, err := iprot.ReadListBegin()
if err != nil {
return fmt.Errorf("error reading list begin: %s")
}
tSlice := make([]*LogEntry, 0, size)
p.Messages = tSlice
for i := 0; i < size; i++ {
_elem5 := NewLogEntry()
if err := _elem5.Read(iprot); err != nil {
return fmt.Errorf("%T error reading struct: %s", _elem5, err)
}
p.Messages = append(p.Messages, _elem5)
}
if err := iprot.ReadListEnd(); err != nil {
return fmt.Errorf("error reading list end: %s")
}
return nil
}
示例9: ReadField1
func (p *AppendBatchArgs) ReadField1(iprot thrift.TProtocol) error {
_, size, err := iprot.ReadListBegin()
if err != nil {
return fmt.Errorf("error reading list begin: %s", err)
}
tSlice := make([]*ThriftFlumeEvent, 0, size)
p.Events = tSlice
for i := 0; i < size; i++ {
_elem8 := &ThriftFlumeEvent{}
if err := _elem8.Read(iprot); err != nil {
return fmt.Errorf("%T error reading struct: %s", _elem8, err)
}
p.Events = append(p.Events, _elem8)
}
if err := iprot.ReadListEnd(); err != nil {
return fmt.Errorf("error reading list end: %s", err)
}
return nil
}
示例10: ReadField1
func (p *BoltProcessRecordsArgs) ReadField1(iprot thrift.TProtocol) error {
_, size, err := iprot.ReadListBegin()
if err != nil {
return fmt.Errorf("error reading list begin: %s", err)
}
tSlice := make([]*Record, 0, size)
p.Records = tSlice
for i := 0; i < size; i++ {
_elem43 := &Record{}
if err := _elem43.Read(iprot); err != nil {
return fmt.Errorf("%T error reading struct: %s", _elem43, err)
}
p.Records = append(p.Records, _elem43)
}
if err := iprot.ReadListEnd(); err != nil {
return fmt.Errorf("error reading list end: %s", err)
}
return nil
}
示例11: readField4
func (p *Entry) readField4(iprot thrift.TProtocol) error {
_, size, err := iprot.ReadListBegin()
if err != nil {
return thrift.PrependError("error reading list begin: ", err)
}
tSlice := make([]*EntryMessage, 0, size)
p.Context = tSlice
for i := 0; i < size; i++ {
_elem0 := &EntryMessage{}
if err := _elem0.Read(iprot); err != nil {
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem0), err)
}
p.Context = append(p.Context, _elem0)
}
if err := iprot.ReadListEnd(); err != nil {
return thrift.PrependError("error reading list end: ", err)
}
return nil
}
示例12: readField8
func (p *Span) readField8(iprot thrift.TProtocol) error {
_, size, err := iprot.ReadListBegin()
if err != nil {
return thrift.PrependError("error reading list begin: ", err)
}
tSlice := make([]*BinaryAnnotation, 0, size)
p.BinaryAnnotations = tSlice
for i := 0; i < size; i++ {
_elem1 := &BinaryAnnotation{}
if err := _elem1.Read(iprot); err != nil {
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem1), err)
}
p.BinaryAnnotations = append(p.BinaryAnnotations, _elem1)
}
if err := iprot.ReadListEnd(); err != nil {
return thrift.PrependError("error reading list end: ", err)
}
return nil
}
示例13: ReadField4
func (p *FichaProcedimentoMasterThrift) ReadField4(iprot thrift.TProtocol) error {
_, size, err := iprot.ReadListBegin()
if err != nil {
return fmt.Errorf("error reading list begin: %s", err)
}
tSlice := make([]*FichaProcedimentoChildThrift, 0, size)
p.AtendProcedimentos = tSlice
for i := 0; i < size; i++ {
_elem2 := &FichaProcedimentoChildThrift{}
if err := _elem2.Read(iprot); err != nil {
return fmt.Errorf("%T error reading struct: %s", _elem2, err)
}
p.AtendProcedimentos = append(p.AtendProcedimentos, _elem2)
}
if err := iprot.ReadListEnd(); err != nil {
return fmt.Errorf("error reading list end: %s", err)
}
return nil
}
示例14: ReadField3
func (p *CitySvcCreateCityArgs) ReadField3(iprot thrift.TProtocol) error {
_, size, err := iprot.ReadListBegin()
if err != nil {
return thrift.PrependError("error reading list begin: ", err)
}
tSlice := make([]*Coordinate, 0, size)
p.Coords = tSlice
for i := 0; i < size; i++ {
_elem186 := &Coordinate{}
if err := _elem186.Read(iprot); err != nil {
return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem186), err)
}
p.Coords = append(p.Coords, _elem186)
}
if err := iprot.ReadListEnd(); err != nil {
return thrift.PrependError("error reading list end: ", err)
}
return nil
}
示例15: ReadField6
func (p *Span) ReadField6(iprot thrift.TProtocol) error {
_, size, err := iprot.ReadListBegin()
if err != nil {
return fmt.Errorf("error reading list begin: %s", err)
}
tSlice := make([]*Annotation, 0, size)
p.Annotations = tSlice
for i := 0; i < size; i++ {
_elem0 := &Annotation{}
if err := _elem0.Read(iprot); err != nil {
return fmt.Errorf("%T error reading struct: %s", _elem0, err)
}
p.Annotations = append(p.Annotations, _elem0)
}
if err := iprot.ReadListEnd(); err != nil {
return fmt.Errorf("error reading list end: %s", err)
}
return nil
}