本文整理匯總了Golang中github.com/bcgraham/tsumtsum/external/thrift.TProtocol.WriteI64方法的典型用法代碼示例。如果您正苦於以下問題:Golang TProtocol.WriteI64方法的具體用法?Golang TProtocol.WriteI64怎麽用?Golang TProtocol.WriteI64使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/bcgraham/tsumtsum/external/thrift.TProtocol
的用法示例。
在下文中一共展示了TProtocol.WriteI64方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: writeField2
func (p *FetchMessageOperationsArgs) writeField2(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("localRevision", thrift.I64, 2); err != nil {
return fmt.Errorf("%T write field begin error 2:localRevision: %s", p, err)
}
if err := oprot.WriteI64(int64(p.LocalRevision)); err != nil {
return fmt.Errorf("%T.localRevision (2) field write error: %s", p, err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 2:localRevision: %s", p, err)
}
return err
}
示例2: writeField3
func (p *FetchMessageOperationsArgs) writeField3(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("lastOpTimestamp", thrift.I64, 3); err != nil {
return fmt.Errorf("%T write field begin error 3:lastOpTimestamp: %s", p, err)
}
if err := oprot.WriteI64(int64(p.LastOpTimestamp)); err != nil {
return fmt.Errorf("%T.lastOpTimestamp (3) field write error: %s", p, err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 3:lastOpTimestamp: %s", p, err)
}
return err
}
示例3: writeField0
func (p *GetLastOpRevisionResult) writeField0(oprot thrift.TProtocol) (err error) {
if p.IsSetSuccess() {
if err := oprot.WriteFieldBegin("success", thrift.I64, 0); err != nil {
return fmt.Errorf("%T write field begin error 0:success: %s", p, err)
}
if err := oprot.WriteI64(int64(*p.Success)); err != nil {
return fmt.Errorf("%T.success (0) field write error: %s", p, err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 0:success: %s", p, err)
}
}
return err
}