Write a string to the wire with a varint size preceding.
(ctx context.Context, value string)
| 332 | |
| 333 | // Write a string to the wire with a varint size preceding. |
| 334 | func (p *TCompactProtocol) WriteString(ctx context.Context, value string) error { |
| 335 | _, e := p.writeVarint32(int32(len(value))) |
| 336 | if e != nil { |
| 337 | return NewTProtocolException(e) |
| 338 | } |
| 339 | if len(value) == 0 { |
| 340 | return nil |
| 341 | } |
| 342 | _, e = p.trans.WriteString(value) |
| 343 | return e |
| 344 | } |
| 345 | |
| 346 | // Write a byte array, using a varint for the size. |
| 347 | func (p *TCompactProtocol) WriteBinary(ctx context.Context, bin []byte) error { |
no test coverage detected