(n int)
| 279 | } |
| 280 | |
| 281 | func (w *compactWriter) WriteLength(n int) error { |
| 282 | if n < 0 { |
| 283 | return fmt.Errorf("negative length cannot be encoded in thrift: %d", n) |
| 284 | } |
| 285 | if n > math.MaxInt32 { |
| 286 | return fmt.Errorf("length is too large to be encoded in thrift: %d", n) |
| 287 | } |
| 288 | return w.writeUvarint(uint64(n)) |
| 289 | } |
| 290 | |
| 291 | func (w *compactWriter) WriteMessage(m Message) error { |
| 292 | if err := w.binary.writeByte(0x82); err != nil { |
no test coverage detected