Fixes for latest version of Go (2011 Feb)

- bytes.AddBytes replaced by append()
- reflect.ArrayCopy renamed to reflect.Copy
This commit is contained in:
Chidambaram Annamalai 2011-02-12 13:47:47 +05:30
parent 151014d5ea
commit 68da078750
2 changed files with 2 additions and 3 deletions

View file

@ -9,7 +9,6 @@ package bencode
import (
"bufio"
"bytes"
"fmt"
"io"
"os"
@ -73,7 +72,7 @@ func collectInt(r Reader, delim byte) (buf []byte, err os.Error) {
err = os.NewError("expected digit")
return
}
buf = bytes.AddByte(buf, c)
buf = append(buf, c)
}
return
}

View file

@ -144,7 +144,7 @@ func (b *structBuilder) Elem(i int) Builder {
n *= 2
}
nv := reflect.MakeSlice(v.Type().(*reflect.SliceType), v.Len(), n)
reflect.ArrayCopy(nv, v)
reflect.Copy(nv, v)
v.Set(nv)
}
if v.Len() <= i && i < v.Cap() {