(n int)
| 276 | } |
| 277 | |
| 278 | func (w *binaryWriter) WriteLength(n int) error { |
| 279 | if n < 0 { |
| 280 | return fmt.Errorf("negative length cannot be encoded in thrift: %d", n) |
| 281 | } |
| 282 | if n > math.MaxInt32 { |
| 283 | return fmt.Errorf("length is too large to be encoded in thrift: %d", n) |
| 284 | } |
| 285 | return w.WriteInt32(int32(n)) |
| 286 | } |
| 287 | |
| 288 | func (w *binaryWriter) WriteMessage(m Message) error { |
| 289 | if w.p.NonStrict { |
no test coverage detected