remove use of Buffer.Value

This commit is contained in:
Darien Raymond committed 2016-12-05 21:33:24 +01:00
1 parent 186bf1f141
commit 4bf8288cc2
10 files changed
+21 -22

No files matched your search

+2 -2
View File
@@ -40,14 +40,14 @@ func MarshalCommand(command interface{}, writer io.Writer) error {
return err
}
auth := Authenticate(buffer.Value)
auth := Authenticate(buffer.Bytes())
len := buffer.Len() + 4
if len > 255 {
return ErrCommandTooLarge
}
writer.Write([]byte{cmdId, byte(len), byte(auth >> 24), byte(auth >> 16), byte(auth >> 8), byte(auth)})
writer.Write(buffer.Value)
writer.Write(buffer.Bytes())
return nil
}