type_encode: Added to-do.

pull/3/head
Dustin Oprea 2018-05-25 21:04:33 -04:00
parent 75ff008365
commit 5996e32e27
1 changed files with 1 additions and 0 deletions

View File

@ -84,6 +84,7 @@ func (ve *ValueEncoder) encodeShorts(value []uint16) (ed EncodedData, err error)
ed.Encoded = make([]byte, ed.UnitCount * 2)
for i := uint32(0); i < ed.UnitCount; i++ {
// TODO(dustin): We have a ton of duplication in how we handle the byte-orders and the inherent risk of accidentally doing something inconsistently. Move this to reusable code.
if ve.byteOrder == binary.BigEndian {
binary.BigEndian.PutUint16(ed.Encoded[i*2:(i+1)*2], value[i])
} else {