Пример #1
0
func (p *SemanticVersion) writeField3(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("patch", thrift.I16, 3); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:patch: ", p), err)
	}
	if err := oprot.WriteI16(int16(p.Patch)); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T.patch (3) field write error: ", p), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 3:patch: ", p), err)
	}
	return err
}
Пример #2
0
func (p *SemanticVersion) writeField2(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("minor", thrift.I16, 2); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:minor: ", p), err)
	}
	if err := oprot.WriteI16(int16(p.Minor)); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T.minor (2) field write error: ", p), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 2:minor: ", p), err)
	}
	return err
}