** * Writing Methods */
(ctx context.Context, name string, typeId TMessageType, seqId int32)
| 106 | */ |
| 107 | |
| 108 | func (p *TBinaryProtocol) WriteMessageBegin(ctx context.Context, name string, typeId TMessageType, seqId int32) error { |
| 109 | if p.cfg.GetTBinaryStrictWrite() { |
| 110 | version := uint32(VERSION_1) | uint32(typeId) |
| 111 | e := p.WriteI32(ctx, int32(version)) |
| 112 | if e != nil { |
| 113 | return e |
| 114 | } |
| 115 | e = p.WriteString(ctx, name) |
| 116 | if e != nil { |
| 117 | return e |
| 118 | } |
| 119 | e = p.WriteI32(ctx, seqId) |
| 120 | return e |
| 121 | } else { |
| 122 | e := p.WriteString(ctx, name) |
| 123 | if e != nil { |
| 124 | return e |
| 125 | } |
| 126 | e = p.WriteByte(ctx, int8(typeId)) |
| 127 | if e != nil { |
| 128 | return e |
| 129 | } |
| 130 | e = p.WriteI32(ctx, seqId) |
| 131 | return e |
| 132 | } |
| 133 | } |
| 134 | |
| 135 | func (p *TBinaryProtocol) WriteMessageEnd(ctx context.Context) error { |
| 136 | return nil |
nothing calls this directly
no test coverage detected