mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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:
parent
1f90447e31
commit
009aebdba8
10 changed files with 31 additions and 118 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue