summaryrefslogtreecommitdiff
path: root/src/lib/bufio_test.go
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2009-04-17 00:08:24 -0700
committerRob Pike <r@golang.org>2009-04-17 00:08:24 -0700
commit3696e3e558a5be76b8af9698ff0e56719e47ec59 (patch)
treec20f34ec6f9dea967a511f65b239c5e8637fec8f /src/lib/bufio_test.go
parentdf02778ccda228c665179d0ff3dac77217ad6633 (diff)
downloadgolang-3696e3e558a5be76b8af9698ff0e56719e47ec59.tar.gz
Step 1 of the Big Error Shift: make os.Error an interface and replace *os.Errors with os.Errors.
lib/template updated to use new setup; its clients also updated. Step 2 will make os's error support internally much cleaner. R=rsc OCL=27586 CL=27586
Diffstat (limited to 'src/lib/bufio_test.go')
-rw-r--r--src/lib/bufio_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/bufio_test.go b/src/lib/bufio_test.go
index d8c77c153..00ab4a414 100644
--- a/src/lib/bufio_test.go
+++ b/src/lib/bufio_test.go
@@ -30,7 +30,7 @@ func newByteReader(p []byte) io.Read {
return b
}
-func (b *byteReader) Read(p []byte) (int, *os.Error) {
+func (b *byteReader) Read(p []byte) (int, os.Error) {
n := len(p);
if n > len(b.p) {
n = len(b.p)
@@ -52,7 +52,7 @@ func newHalfByteReader(p []byte) io.Read {
return b
}
-func (b *halfByteReader) Read(p []byte) (int, *os.Error) {
+func (b *halfByteReader) Read(p []byte) (int, os.Error) {
n := len(p)/2;
if n == 0 && len(p) > 0 {
n = 1
@@ -76,7 +76,7 @@ func newRot13Reader(r io.Read) *rot13Reader {
return r13
}
-func (r13 *rot13Reader) Read(p []byte) (int, *os.Error) {
+func (r13 *rot13Reader) Read(p []byte) (int, os.Error) {
n, e := r13.r.Read(p);
if e != nil {
return n, e
@@ -218,7 +218,7 @@ func TestBufRead(t *testing.T) {
}
type writeBuffer interface {
- Write(p []byte) (int, *os.Error);
+ Write(p []byte) (int, os.Error);
GetBytes() []byte
}
@@ -232,7 +232,7 @@ func newByteWriter() writeBuffer {
return new(byteWriter)
}
-func (w *byteWriter) Write(p []byte) (int, *os.Error) {
+func (w *byteWriter) Write(p []byte) (int, os.Error) {
if w.p == nil {
w.p = make([]byte, len(p)+100)
} else if w.n + len(p) >= len(w.p) {
@@ -262,7 +262,7 @@ func newHalfByteWriter() writeBuffer {
return w
}
-func (w *halfByteWriter) Write(p []byte) (int, *os.Error) {
+func (w *halfByteWriter) Write(p []byte) (int, os.Error) {
n := (len(p)+1) / 2;
// BUG return w.bw.Write(p[0:n])
r, e := w.bw.Write(p[0:n]);