fix up typos for PR review
This commit is contained in:
parent
4064a1fcd4
commit
4e8c622b47
|
@ -105,6 +105,7 @@ func (bigEndian) Uint64(b []byte) uint64 {
|
|||
}
|
||||
|
||||
// For dealing with types not supported by the encoding/binary interface
|
||||
|
||||
func PutInt32(v int32) []byte {
|
||||
buf := make([]byte, 4)
|
||||
*(*int32)(unsafe.Pointer(&buf[0])) = v
|
||||
|
|
|
@ -130,13 +130,6 @@ func TestOtherTypes(t *testing.T) {
|
|||
actual: PutString("test"),
|
||||
unmarshal: func(b []byte) interface{} { return String(b) },
|
||||
},
|
||||
{
|
||||
name: "NullTerminatedString",
|
||||
expected: []byte{0x74, 0x65, 0x73, 0x74, 0x00},
|
||||
expectedv: "test",
|
||||
actual: PutNullTerminatedString("test"),
|
||||
unmarshal: func(b []byte) interface{} { return String(b) },
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
if bytes.Compare(tt.actual, tt.expected) != 0 {
|
||||
|
|
Loading…
Reference in New Issue