WriteInt32Slice writes []int32 to buffer using ARRAY protocol
(buf *ByteBuffer, value []int32)
| 820 | |
| 821 | // WriteInt32Slice writes []int32 to buffer using ARRAY protocol |
| 822 | func WriteInt32Slice(buf *ByteBuffer, value []int32) { |
| 823 | size := len(value) * 4 |
| 824 | buf.WriteLength(size) |
| 825 | if len(value) > 0 { |
| 826 | if isLittleEndian { |
| 827 | buf.WriteBinary(unsafe.Slice((*byte)(unsafe.Pointer(&value[0])), size)) |
| 828 | } else { |
| 829 | for i := 0; i < len(value); i++ { |
| 830 | buf.WriteInt32(value[i]) |
| 831 | } |
| 832 | } |
| 833 | } |
| 834 | } |
| 835 | |
| 836 | // ReadInt32Slice reads []int32 from buffer using ARRAY protocol |
| 837 | func ReadInt32Slice(buf *ByteBuffer, err *Error) []int32 { |
no test coverage detected