(typ ValueType, data []byte)
| 450 | } |
| 451 | |
| 452 | func writeBinary(typ ValueType, data []byte) ([]byte, error) { |
| 453 | var scratch [binary.MaxVarintLen64]byte |
| 454 | n := binary.PutUvarint(scratch[:], uint64(len(data))) |
| 455 | |
| 456 | var buf bytes.Buffer |
| 457 | buf.WriteByte(byte(typ)) |
| 458 | buf.Write(scratch[:n]) |
| 459 | buf.Write(data) |
| 460 | return buf.Bytes(), nil |
| 461 | } |
| 462 | |
| 463 | func (n Numeric) raw() []byte { |
| 464 | return []byte(n) |
no test coverage detected