本文整理汇总了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
}