aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/bytes/bytes.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2010-10-27 19:47:23 -0700
committerRuss Cox <rsc@golang.org>2010-10-27 19:47:23 -0700
commit69c4e9380bdd34eefe8c1e49f203964a17e5bee3 (patch)
treeab3120dbe4a74ec3f609ab678fc1cef7a1943506 /src/pkg/bytes/bytes.go
parentd8b5d039cd1bec151cc325973ff32bd34ebb0456 (diff)
downloadgo-69c4e9380bdd34eefe8c1e49f203964a17e5bee3.tar.xz
use append
R=gri, r, r2 CC=golang-dev https://golang.org/cl/2743042
Diffstat (limited to 'src/pkg/bytes/bytes.go')
-rw-r--r--src/pkg/bytes/bytes.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/bytes/bytes.go b/src/pkg/bytes/bytes.go
index 62311d41d6..1939fd5678 100644
--- a/src/pkg/bytes/bytes.go
+++ b/src/pkg/bytes/bytes.go
@@ -545,7 +545,7 @@ func resize(n int) int {
// Add appends the contents of t to the end of s and returns the result.
// If s has enough capacity, it is extended in place; otherwise a
// new array is allocated and returned.
-func Add(s, t []byte) []byte {
+func Add(s, t []byte) []byte { // TODO
lens := len(s)
lent := len(t)
if lens+lent <= cap(s) {
@@ -562,7 +562,7 @@ func Add(s, t []byte) []byte {
// AddByte appends byte t to the end of s and returns the result.
// If s has enough capacity, it is extended in place; otherwise a
// new array is allocated and returned.
-func AddByte(s []byte, t byte) []byte {
+func AddByte(s []byte, t byte) []byte { // TODO
lens := len(s)
if lens+1 <= cap(s) {
s = s[0 : lens+1]