Removed bytes.Add and bytes.AddByte; we now have 'append'.
Changed all uses of bytes.Add (aside from those testing bytes.Add) to append(a, b...).
Also ran "gofmt -s" and made use of copy([]byte, string) in the fasta benchmark.
R=golang-dev, r, r2
CC=golang-dev
https://golang.org/cl/3302042
diff --git a/src/pkg/json/stream.go b/src/pkg/json/stream.go
index d4fb346..cb9b165 100644
--- a/src/pkg/json/stream.go
+++ b/src/pkg/json/stream.go
@@ -5,7 +5,6 @@
package json
import (
- "bytes"
"io"
"os"
)
@@ -177,7 +176,7 @@
if m == nil {
return os.NewError("json.RawMessage: UnmarshalJSON on nil pointer")
}
- *m = bytes.Add((*m)[0:0], data)
+ *m = append((*m)[0:0], data...)
return nil
}