本文整理汇总了Golang中git/apache/org/thrift/git/lib/go/thrift.TProtocol.WriteListEnd方法的典型用法代码示例。如果您正苦于以下问题:Golang TProtocol.WriteListEnd方法的具体用法?Golang TProtocol.WriteListEnd怎么用?Golang TProtocol.WriteListEnd使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类git/apache/org/thrift/git/lib/go/thrift.TProtocol
的用法示例。
在下文中一共展示了TProtocol.WriteListEnd方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: writeField6
func (p *Span) writeField6(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("annotations", thrift.LIST, 6); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:annotations: ", p), err)
}
if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Annotations)); err != nil {
return thrift.PrependError("error writing list begin: ", err)
}
for _, v := range p.Annotations {
if err := v.Write(oprot); err != nil {
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err)
}
}
if err := oprot.WriteListEnd(); err != nil {
return thrift.PrependError("error writing list end: ", err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field end error 6:annotations: ", p), err)
}
return err
}
示例2: writeField3
func (p *CitySvcCreateCityArgs) writeField3(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("coords", thrift.LIST, 3); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:coords: ", p), err)
}
if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Coords)); err != nil {
return thrift.PrependError("error writing list begin: ", err)
}
for _, v := range p.Coords {
if err := v.Write(oprot); err != nil {
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err)
}
}
if err := oprot.WriteListEnd(); err != nil {
return thrift.PrependError("error writing list end: ", err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field end error 3:coords: ", p), err)
}
return err
}
示例3: writeField1
func (p *TestCase4Args) writeField1(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("blog", thrift.LIST, 1); err != nil {
return fmt.Errorf("%T write field begin error 1:blog: %s", p, err)
}
if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Blog)); err != nil {
return fmt.Errorf("error writing list begin: %s", err)
}
for _, v := range p.Blog {
if err := v.Write(oprot); err != nil {
return fmt.Errorf("%T error writing struct: %s", v, err)
}
}
if err := oprot.WriteListEnd(); err != nil {
return fmt.Errorf("error writing list end: %s", err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 1:blog: %s", p, err)
}
return err
}
示例4: writeField8
func (p *Span) writeField8(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("binary_annotations", thrift.LIST, 8); err != nil {
return fmt.Errorf("%T write field begin error 8:binary_annotations: %s", p, err)
}
if err := oprot.WriteListBegin(thrift.STRUCT, len(p.BinaryAnnotations)); err != nil {
return fmt.Errorf("error writing list begin: %s", err)
}
for _, v := range p.BinaryAnnotations {
if err := v.Write(oprot); err != nil {
return fmt.Errorf("%T error writing struct: %s", v, err)
}
}
if err := oprot.WriteListEnd(); err != nil {
return fmt.Errorf("error writing list end: %s", err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 8:binary_annotations: %s", p, err)
}
return err
}
示例5: writeField4
func (p *AddTagArgs) writeField4(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("tags", thrift.LIST, 4); err != nil {
return fmt.Errorf("%T write field begin error 4:tags: %s", p, err)
}
if err := oprot.WriteListBegin(thrift.STRING, len(p.Tags)); err != nil {
return fmt.Errorf("error writing list begin: %s", err)
}
for _, v := range p.Tags {
if err := oprot.WriteString(string(v)); err != nil {
return fmt.Errorf("%T. (0) field write error: %s", p, err)
}
}
if err := oprot.WriteListEnd(); err != nil {
return fmt.Errorf("error writing list end: %s", err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 4:tags: %s", p, err)
}
return err
}
示例6: writeField1
func (p *DeletePrivateMessageArgs) writeField1(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("keyList", thrift.LIST, 1); err != nil {
return fmt.Errorf("%T write field begin error 1:keyList: %s", p, err)
}
if err := oprot.WriteListBegin(thrift.STRUCT, len(p.KeyList)); err != nil {
return fmt.Errorf("error writing list begin: %s", err)
}
for _, v := range p.KeyList {
if err := v.Write(oprot); err != nil {
return fmt.Errorf("%T error writing struct: %s", v, err)
}
}
if err := oprot.WriteListEnd(); err != nil {
return fmt.Errorf("error writing list end: %s", err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 1:keyList: %s", p, err)
}
return err
}
示例7: writeField3
func (p *ThriftColorGroup) writeField3(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("colors", thrift.LIST, 3); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:colors: ", p), err)
}
if err := oprot.WriteListBegin(thrift.STRING, len(p.Colors)); err != nil {
return thrift.PrependError("error writing list begin: ", err)
}
for _, v := range p.Colors {
if err := oprot.WriteString(string(v)); err != nil {
return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err)
}
}
if err := oprot.WriteListEnd(); err != nil {
return thrift.PrependError("error writing list end: ", err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field end error 3:colors: ", p), err)
}
return err
}
示例8: writeField1
func (p *TerminalServicePushPendingRequestFormArgs) writeField1(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("forms", thrift.LIST, 1); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:forms: ", p), err)
}
if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Forms)); err != nil {
return thrift.PrependError("error writing list begin: ", err)
}
for _, v := range p.Forms {
if err := v.Write(oprot); err != nil {
return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err)
}
}
if err := oprot.WriteListEnd(); err != nil {
return thrift.PrependError("error writing list end: ", err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field end error 1:forms: ", p), err)
}
return err
}
示例9: writeField11
func (p *Recommender) writeField11(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("displayItems", thrift.LIST, 11); err != nil {
return fmt.Errorf("%T write field begin error 11:displayItems: %s", p, err)
}
if err := oprot.WriteListBegin(thrift.STRING, len(p.DisplayItems)); err != nil {
return fmt.Errorf("error writing list begin: %s", err)
}
for _, v := range p.DisplayItems {
if err := oprot.WriteString(string(v)); err != nil {
return fmt.Errorf("%T. (0) field write error: %s", p, err)
}
}
if err := oprot.WriteListEnd(); err != nil {
return fmt.Errorf("error writing list end: %s", err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 11:displayItems: %s", p, err)
}
return err
}
示例10: writeField1
func (p *AppendBatchArgs) writeField1(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("events", thrift.LIST, 1); err != nil {
return fmt.Errorf("%T write field begin error 1:events: %s", p, err)
}
if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Events)); err != nil {
return fmt.Errorf("error writing list begin: %s", err)
}
for _, v := range p.Events {
if err := v.Write(oprot); err != nil {
return fmt.Errorf("%T error writing struct: %s", v, err)
}
}
if err := oprot.WriteListEnd(); err != nil {
return fmt.Errorf("error writing list end: %s", err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 1:events: %s", p, err)
}
return err
}
示例11: writeField2
func (p *DeleteRemindingMsgByTypeArgs) writeField2(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("types", thrift.LIST, 2); err != nil {
return fmt.Errorf("%T write field begin error 2:types: %s", p, err)
}
if err := oprot.WriteListBegin(thrift.I32, len(p.Types)); err != nil {
return fmt.Errorf("error writing list begin: %s", err)
}
for _, v := range p.Types {
if err := oprot.WriteI32(int32(v)); err != nil {
return fmt.Errorf("%T. (0) field write error: %s", p, err)
}
}
if err := oprot.WriteListEnd(); err != nil {
return fmt.Errorf("error writing list end: %s", err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 2:types: %s", p, err)
}
return err
}
示例12: writeField3
func (p *Coffee) writeField3(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("sweetners", thrift.LIST, 3); err != nil {
return fmt.Errorf("%T write field begin error 3:sweetners: %s", p, err)
}
if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Sweetners)); err != nil {
return fmt.Errorf("error writing list begin: %s", err)
}
for _, v := range p.Sweetners {
if err := v.Write(oprot); err != nil {
return fmt.Errorf("%T error writing struct: %s", v, err)
}
}
if err := oprot.WriteListEnd(); err != nil {
return fmt.Errorf("error writing list end: %s", err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 3:sweetners: %s", p, err)
}
return err
}
示例13: writeField3
func (p *GrantUserAccessToGroupRegionArgs) writeField3(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("zones", thrift.LIST, 3); err != nil {
return fmt.Errorf("%T write field begin error 3:zones: %s", p, err)
}
if err := oprot.WriteListBegin(thrift.I32, len(p.Zones)); err != nil {
return fmt.Errorf("error writing list begin: %s", err)
}
for _, v := range p.Zones {
if err := oprot.WriteI32(int32(v)); err != nil {
return fmt.Errorf("%T. (0) field write error: %s", p, err)
}
}
if err := oprot.WriteListEnd(); err != nil {
return fmt.Errorf("error writing list end: %s", err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 3:zones: %s", p, err)
}
return err
}
示例14: writeField7
func (p *FichaVisitaDomiciliarChildThrift) writeField7(oprot thrift.TProtocol) (err error) {
if p.IsSetMotivosVisita() {
if err := oprot.WriteFieldBegin("motivosVisita", thrift.LIST, 7); err != nil {
return fmt.Errorf("%T write field begin error 7:motivosVisita: %s", p, err)
}
if err := oprot.WriteListBegin(thrift.I64, len(p.MotivosVisita)); err != nil {
return fmt.Errorf("error writing list begin: %s", err)
}
for _, v := range p.MotivosVisita {
if err := oprot.WriteI64(int64(v)); err != nil {
return fmt.Errorf("%T. (0) field write error: %s", p, err)
}
}
if err := oprot.WriteListEnd(); err != nil {
return fmt.Errorf("error writing list end: %s", err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 7:motivosVisita: %s", p, err)
}
}
return err
}
示例15: writeField5
func (p *QueryResult) writeField5(oprot thrift.TProtocol) (err error) {
if p.VmMoneyList != nil {
if err := oprot.WriteFieldBegin("vmMoneyList", thrift.LIST, 5); err != nil {
return fmt.Errorf("%T write field begin error 5:vmMoneyList: %s", p, err)
}
if err := oprot.WriteListBegin(thrift.STRUCT, len(p.VmMoneyList)); err != nil {
return fmt.Errorf("error writing list begin: %s")
}
for _, v := range p.VmMoneyList {
if err := v.Write(oprot); err != nil {
return fmt.Errorf("%T error writing struct: %s", v)
}
}
if err := oprot.WriteListEnd(); err != nil {
return fmt.Errorf("error writing list end: %s")
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 5:vmMoneyList: %s", p, err)
}
}
return err
}