本文整理匯總了Golang中git/apache/org/thrift/git/lib/go/thrift.TProtocol.ReadI16方法的典型用法代碼示例。如果您正苦於以下問題:Golang TProtocol.ReadI16方法的具體用法?Golang TProtocol.ReadI16怎麽用?Golang TProtocol.ReadI16使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類git/apache/org/thrift/git/lib/go/thrift.TProtocol
的用法示例。
在下文中一共展示了TProtocol.ReadI16方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: ReadField2
func (p *Flop) ReadField2(iprot thrift.TProtocol) error {
if v, err := iprot.ReadI16(); err != nil {
return fmt.Errorf("error reading field 2: %s", err)
} else {
p.B = v
}
return nil
}
示例2: readField1
func (p *Types) readField1(iprot thrift.TProtocol) error {
if v, err := iprot.ReadI16(); err != nil {
return thrift.PrependError("error reading field 1: ", err)
} else {
p.ShortValue = v
}
return nil
}
示例3: ReadField2
func (p *Message) ReadField2(iprot thrift.TProtocol) error {
if v, err := iprot.ReadI16(); err != nil {
return thrift.PrependError("error reading field 2: ", err)
} else {
p.VoteType = v
}
return nil
}
示例4: ReadField0
func (p *CountResult) ReadField0(iprot thrift.TProtocol) error {
if v, err := iprot.ReadI16(); err != nil {
return fmt.Errorf("error reading field 0: %s", err)
} else {
p.Success = &v
}
return nil
}
示例5: ReadField4
func (p *Student) ReadField4(iprot thrift.TProtocol) error {
if v, err := iprot.ReadI16(); err != nil {
return thrift.PrependError("error reading field 4: ", err)
} else {
p.Sage = v
}
return nil
}
示例6: readField2
func (p *Endpoint) readField2(iprot thrift.TProtocol) error {
if v, err := iprot.ReadI16(); err != nil {
return thrift.PrependError("error reading field 2: ", err)
} else {
p.Port = v
}
return nil
}
示例7: readField2
func (p *GetArgs) readField2(iprot thrift.TProtocol) error {
if v, err := iprot.ReadI16(); err != nil {
return fmt.Errorf("error reading field 2: %s")
} else {
p.ColumnId = TColumnKey(v)
}
return nil
}
示例8: readField5
func (p *Person) readField5(iprot thrift.TProtocol) error {
if v, err := iprot.ReadI16(); err != nil {
return thrift.PrependError("error reading field 5: ", err)
} else {
p.Age = v
}
return nil
}