Skip to content

Commit

Permalink
Deleted inclusion of "bytes", and replace bytes.Add() with append()
Browse files Browse the repository at this point in the history
  • Loading branch information
phillyqueso committed Dec 9, 2010
1 parent bd2d3c8 commit 3b6d6a4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions mongo/collection.go
Expand Up @@ -5,7 +5,6 @@
package mongo

import (
"bytes"
"os"
"rand"
)
Expand Down Expand Up @@ -38,7 +37,7 @@ func (self *Connection) sendMessage(m message) os.Error {
body := m.Bytes()
h := header(msgHeader{int32(len(body) + _HEADER_SIZE), rand.Int31(), 0, m.OpCode()})

msg := bytes.Add(h, body)
msg := append(h, body...)
_, err := self.conn.Write(msg)

return err
Expand All @@ -50,7 +49,7 @@ func (self *Connection) sendMessageToReply(m message, reqID int32) os.Error {
body := m.Bytes()
h := header(msgHeader{int32(len(body) + _HEADER_SIZE), reqID, 0, m.OpCode()})

msg := bytes.Add(h, body)
msg := append(h, body...)
_, err := self.conn.Write(msg)

return err
Expand Down

0 comments on commit 3b6d6a4

Please sign in to comment.