(buf []byte, value uint32)
| 766 | } |
| 767 | |
| 768 | func msgpackWriteUint(buf []byte, value uint32) []byte { |
| 769 | if value <= 0x7f { |
| 770 | return append(buf, byte(value)) |
| 771 | } |
| 772 | if value <= 0xff { |
| 773 | return append(buf, 0xcc, byte(value)) |
| 774 | } |
| 775 | if value <= 0xffff { |
| 776 | return append(buf, 0xcd, byte(value>>8), byte(value)) |
| 777 | } |
| 778 | return append(buf, 0xce, byte(value>>24), byte(value>>16), byte(value>>8), byte(value)) |
| 779 | } |
| 780 | |
| 781 | func msgpackWriteString(buf []byte, s string) []byte { |
| 782 | n := len(s) |
no test coverage detected