本文整理汇总了Golang中github.com/sipin/gothrift/thrift.TProtocol.WriteFieldEnd方法的典型用法代码示例。如果您正苦于以下问题:Golang TProtocol.WriteFieldEnd方法的具体用法?Golang TProtocol.WriteFieldEnd怎么用?Golang TProtocol.WriteFieldEnd使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/sipin/gothrift/thrift.TProtocol
的用法示例。
在下文中一共展示了TProtocol.WriteFieldEnd方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: writeField2
func (p *UserGroup) writeField2(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("Name", thrift.STRING, 2); err != nil {
return fmt.Errorf("%T write field begin error 2:Name: %s", p, err)
}
if err := oprot.WriteString(string(p.Name)); err != nil {
return fmt.Errorf("%T.Name (2) field write error: %s", p, err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 2:Name: %s", p, err)
}
return err
}
示例2: writeField1
func (p *UserGroup) writeField1(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("ID", thrift.STRING, 1); err != nil {
return fmt.Errorf("%T write field begin error 1:ID: %s", p, err)
}
if err := oprot.WriteString(string(p.ID)); err != nil {
return fmt.Errorf("%T.ID (1) field write error: %s", p, err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 1:ID: %s", p, err)
}
return err
}
示例3: writeField14
func (p *User) writeField14(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("Gender", thrift.STRING, 14); err != nil {
return fmt.Errorf("%T write field begin error 14:Gender: %s", p, err)
}
if err := oprot.WriteString(string(p.Gender)); err != nil {
return fmt.Errorf("%T.Gender (14) field write error: %s", p, err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 14:Gender: %s", p, err)
}
return err
}
示例4: writeField15
func (p *User) writeField15(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("Index", thrift.I32, 15); err != nil {
return fmt.Errorf("%T write field begin error 15:Index: %s", p, err)
}
if err := oprot.WriteI32(int32(p.Index)); err != nil {
return fmt.Errorf("%T.Index (15) field write error: %s", p, err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 15:Index: %s", p, err)
}
return err
}
示例5: writeField12
func (p *User) writeField12(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("PubInfoID", thrift.STRING, 12); err != nil {
return fmt.Errorf("%T write field begin error 12:PubInfoID: %s", p, err)
}
if err := oprot.WriteString(string(p.PubInfoID)); err != nil {
return fmt.Errorf("%T.PubInfoID (12) field write error: %s", p, err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 12:PubInfoID: %s", p, err)
}
return err
}
示例6: writeField13
func (p *User) writeField13(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("OrganizationID", thrift.STRING, 13); err != nil {
return fmt.Errorf("%T write field begin error 13:OrganizationID: %s", p, err)
}
if err := oprot.WriteString(string(p.OrganizationID)); err != nil {
return fmt.Errorf("%T.OrganizationID (13) field write error: %s", p, err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 13:OrganizationID: %s", p, err)
}
return err
}
示例7: writeField9
func (p *User) writeField9(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("IsAdmin", thrift.BOOL, 9); err != nil {
return fmt.Errorf("%T write field begin error 9:IsAdmin: %s", p, err)
}
if err := oprot.WriteBool(bool(p.IsAdmin)); err != nil {
return fmt.Errorf("%T.IsAdmin (9) field write error: %s", p, err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 9:IsAdmin: %s", p, err)
}
return err
}
示例8: writeField11
func (p *User) writeField11(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("Status", thrift.I32, 11); err != nil {
return fmt.Errorf("%T write field begin error 11:Status: %s", p, err)
}
if err := oprot.WriteI32(int32(p.Status)); err != nil {
return fmt.Errorf("%T.Status (11) field write error: %s", p, err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 11:Status: %s", p, err)
}
return err
}
示例9: writeField8
func (p *User) writeField8(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("Remark", thrift.STRING, 8); err != nil {
return fmt.Errorf("%T write field begin error 8:Remark: %s", p, err)
}
if err := oprot.WriteString(string(p.Remark)); err != nil {
return fmt.Errorf("%T.Remark (8) field write error: %s", p, err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 8:Remark: %s", p, err)
}
return err
}
示例10: writeField7
func (p *User) writeField7(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("Picture", thrift.STRING, 7); err != nil {
return fmt.Errorf("%T write field begin error 7:Picture: %s", p, err)
}
if err := oprot.WriteString(string(p.Picture)); err != nil {
return fmt.Errorf("%T.Picture (7) field write error: %s", p, err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 7:Picture: %s", p, err)
}
return err
}
示例11: writeField6
func (p *User) writeField6(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("Intro", thrift.STRING, 6); err != nil {
return fmt.Errorf("%T write field begin error 6:Intro: %s", p, err)
}
if err := oprot.WriteString(string(p.Intro)); err != nil {
return fmt.Errorf("%T.Intro (6) field write error: %s", p, err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 6:Intro: %s", p, err)
}
return err
}
示例12: writeField5
func (p *User) writeField5(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("Email", thrift.STRING, 5); err != nil {
return fmt.Errorf("%T write field begin error 5:Email: %s", p, err)
}
if err := oprot.WriteString(string(p.Email)); err != nil {
return fmt.Errorf("%T.Email (5) field write error: %s", p, err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 5:Email: %s", p, err)
}
return err
}
示例13: writeField3
func (p *User) writeField3(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("Password", thrift.STRING, 3); err != nil {
return fmt.Errorf("%T write field begin error 3:Password: %s", p, err)
}
if err := oprot.WriteString(string(p.Password)); err != nil {
return fmt.Errorf("%T.Password (3) field write error: %s", p, err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 3:Password: %s", p, err)
}
return err
}