aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/datafmt
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
commitd5be41fc4e58995da5797022221d6b84b9894896 (patch)
treef4bb2f73b77370ff44385ccc9ff25cff6fd80319 /src/pkg/datafmt
parent2a1c9377d91e6616cb97bbdf1c220ca2018b44ec (diff)
downloadgo-d5be41fc4e58995da5797022221d6b84b9894896.tar.xz
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/datafmt')
-rw-r--r--src/pkg/datafmt/datafmt.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pkg/datafmt/datafmt.go b/src/pkg/datafmt/datafmt.go
index c3ac311410..8918d5e97f 100644
--- a/src/pkg/datafmt/datafmt.go
+++ b/src/pkg/datafmt/datafmt.go
@@ -367,7 +367,7 @@ func (s *State) Write(data []byte) (int, os.Error) {
if ch == '\n' || ch == '\f' {
// write text segment and indentation
n1, _ := s.output.Write(data[i0 : i+1]);
- n2, _ := s.output.Write(s.indent.Data());
+ n2, _ := s.output.Write(s.indent.Bytes());
n += n1 + n2;
i0 = i + 1;
s.linePos.Offset = s.output.Len();
@@ -604,7 +604,7 @@ func (s *State) eval(fexpr expr, value reflect.Value, index int) bool {
// if the indentation evaluates to nil, the state's output buffer
// didn't change - either way it's ok to append the difference to
// the current identation
- s.indent.Write(s.output.Data()[mark.outputLen : s.output.Len()]);
+ s.indent.Write(s.output.Bytes()[mark.outputLen : s.output.Len()]);
s.restore(mark);
// format group body
@@ -691,7 +691,7 @@ func (f Format) Eval(env Environment, args ...) ([]byte, os.Error) {
}();
err := <- errors;
- return s.output.Data(), err;
+ return s.output.Bytes(), err;
}
@@ -732,5 +732,5 @@ func (f Format) Sprint(args ...) string {
if err != nil {
fmt.Fprintf(&buf, "--- Sprint(%s) failed: %v", fmt.Sprint(args), err);
}
- return string(buf.Data());
+ return string(buf.Bytes());
}