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
This commit is contained in:
Kyle Consalus 2010-12-01 11:59:13 -08:00 committed by Rob Pike
parent 93eb884c98
commit 67c5445327

View File

@ -560,7 +560,7 @@ func (c *Conn) readHandshake() (interface{}, os.Error) {
// The handshake message unmarshallers
// expect to be able to keep references to data,
// so pass in a fresh copy that won't be overwritten.
data = bytes.Add(nil, data)
data = append([]byte(nil), data...)
if !m.unmarshal(data) {
c.sendAlert(alertUnexpectedMessage)