Permalink
Browse files

From bytes.Add() which is deprecated; to append()

  • Loading branch information...
1 parent b56fb29 commit bd2d3c838cf64a8612c2b23264ea40549f8b3968 @phillyqueso phillyqueso committed Dec 9, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 mongo/bson.go
View
@@ -144,7 +144,7 @@ func (self *_Object) Bytes() []byte {
l := buf.Len() + 4
w32 := make([]byte, _WORD32)
pack.PutUint32(w32, uint32(l))
- return bytes.Add(w32, buf.Bytes())
+ return append(w32, buf.Bytes()...)
}
var EmptyObject BSON = &_Object{map[string]BSON{}, _Null{}}
@@ -182,7 +182,7 @@ func (self *_Array) Bytes() []byte {
l := buf.Len() + 4
w32 := make([]byte, _WORD32)
pack.PutUint32(w32, uint32(l))
- return bytes.Add(w32, buf.Bytes())
+ return append(w32, buf.Bytes()...)
}
type _OID struct {

0 comments on commit bd2d3c8

Please sign in to comment.