summaryrefslogtreecommitdiff
path: root/src/pkg/go
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2009-09-16 15:15:00 -0700
committerRob Pike <r@golang.org>2009-09-16 15:15:00 -0700
commit111276355791f987f8afa11068acec498380b1ea (patch)
treef4bb2f73b77370ff44385ccc9ff25cff6fd80319 /src/pkg/go
parent85d73f1a45411a025eb602c73ae9be96461f3e42 (diff)
downloadgolang-111276355791f987f8afa11068acec498380b1ea.tar.gz
rename bytes.Buffer.Data() to bytes.Buffer.Bytes()
R=rsc DELTA=152 (6 added, 0 deleted, 146 changed) OCL=34695 CL=34701
Diffstat (limited to 'src/pkg/go')
-rw-r--r--src/pkg/go/parser/interface.go4
-rw-r--r--src/pkg/go/printer/printer_test.go2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/pkg/go/parser/interface.go b/src/pkg/go/parser/interface.go
index bc13e2e51..3ec75637b 100644
--- a/src/pkg/go/parser/interface.go
+++ b/src/pkg/go/parser/interface.go
@@ -34,7 +34,7 @@ func readSource(filename string, src interface{}) ([]byte, os.Error) {
case *bytes.Buffer:
// is io.Reader, but src is already available in []byte form
if s != nil {
- return s.Data(), nil;
+ return s.Bytes(), nil;
}
case io.Reader:
var buf bytes.Buffer;
@@ -42,7 +42,7 @@ func readSource(filename string, src interface{}) ([]byte, os.Error) {
if err != nil {
return nil, err;
}
- return buf.Data(), nil;
+ return buf.Bytes(), nil;
default:
return nil, os.ErrorString("invalid source");
}
diff --git a/src/pkg/go/printer/printer_test.go b/src/pkg/go/printer/printer_test.go
index 65827de8e..f9019fdac 100644
--- a/src/pkg/go/printer/printer_test.go
+++ b/src/pkg/go/printer/printer_test.go
@@ -53,7 +53,7 @@ func check(t *testing.T, source, golden string, exports bool) {
if _, err := Fprint(&buf, prog, 0, tabwidth); err != nil {
t.Error(err);
}
- res := buf.Data();
+ res := buf.Bytes();
// update golden files if necessary
if *update {