(ctx context.Context, value bool)
| 283 | func (p *TCompactProtocol) WriteSetEnd(ctx context.Context) error { return nil } |
| 284 | |
| 285 | func (p *TCompactProtocol) WriteBool(ctx context.Context, value bool) error { |
| 286 | v := byte(COMPACT_BOOLEAN_FALSE) |
| 287 | if value { |
| 288 | v = byte(COMPACT_BOOLEAN_TRUE) |
| 289 | } |
| 290 | if p.booleanFieldPending { |
| 291 | // we haven't written the field header yet |
| 292 | _, err := p.writeFieldBeginInternal(ctx, p.booleanFieldName, BOOL, p.booleanFieldId, v) |
| 293 | p.booleanFieldPending = false |
| 294 | return NewTProtocolException(err) |
| 295 | } |
| 296 | // we're not part of a field, so just write the value. |
| 297 | err := p.writeByteDirect(v) |
| 298 | return NewTProtocolException(err) |
| 299 | } |
| 300 | |
| 301 | // Write a byte. Nothing to see here! |
| 302 | func (p *TCompactProtocol) WriteByte(ctx context.Context, value int8) error { |
nothing calls this directly
no test coverage detected