MCPcopy Create free account
hub / github.com/apache/iotdb-client-go / ReadField2

Method ReadField2

common/common.go:7025–7043  ·  view source on GitHub ↗
(ctx context.Context, iprot thrift.TProtocol)

Source from the content-addressed store, hash-verified

7023}
7024
7025func (p *TNodeLocations) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
7026 _, size, err := iprot.ReadListBegin(ctx)
7027 if err != nil {
7028 return thrift.PrependError("error reading list begin: ", err)
7029 }
7030 tSlice := make([]*TDataNodeLocation, 0, size)
7031 p.DataNodeLocations = tSlice
7032 for i := 0; i < size; i ++ {
7033 _elem35 := &TDataNodeLocation{}
7034 if err := _elem35.Read(ctx, iprot); err != nil {
7035 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem35), err)
7036 }
7037 p.DataNodeLocations = append(p.DataNodeLocations, _elem35)
7038 }
7039 if err := iprot.ReadListEnd(ctx); err != nil {
7040 return thrift.PrependError("error reading list end: ", err)
7041 }
7042 return nil
7043}
7044
7045func (p *TNodeLocations) Write(ctx context.Context, oprot thrift.TProtocol) error {
7046 if err := oprot.WriteStructBegin(ctx, "TNodeLocations"); err != nil {

Callers 1

ReadMethod · 0.95

Calls 1

ReadMethod · 0.95

Tested by

no test coverage detected