aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2011-02-02 13:42:15 -0800
committerRobert Griesemer <gri@golang.org>2011-02-02 13:42:15 -0800
commit827e98d4fdbb470adf4dd5caafe88ea14e902047 (patch)
tree1015a67fb142e78479c9394e1a94bac19599403f /src
parentfdb46fb470a1e77d585d3d5445c014ea9069095e (diff)
downloadgo-827e98d4fdbb470adf4dd5caafe88ea14e902047.tar.xz
io: rename interfaces
ReadByter -> ByteReader ReadRuner -> RuneReader R=r, r2, rsc CC=golang-dev https://golang.org/cl/4023062
Diffstat (limited to 'src')
-rw-r--r--src/pkg/io/io.go8
-rw-r--r--src/pkg/xml/xml.go4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/pkg/io/io.go b/src/pkg/io/io.go
index b88c213c81..3b87918979 100644
--- a/src/pkg/io/io.go
+++ b/src/pkg/io/io.go
@@ -150,20 +150,20 @@ type WriterAt interface {
WriteAt(p []byte, off int64) (n int, err os.Error)
}
-// ReadByter is the interface that wraps the ReadByte method.
+// ByteReader is the interface that wraps the ReadByte method.
//
// ReadByte reads and returns the next byte from the input.
// If no byte is available, err will be set.
-type ReadByter interface {
+type ByteReader interface {
ReadByte() (c byte, err os.Error)
}
-// ReadRuner is the interface that wraps the ReadRune method.
+// RuneReader is the interface that wraps the ReadRune method.
//
// ReadRune reads a single UTF-8 encoded Unicode character
// and returns the rune and its size in bytes. If no character is
// available, err will be set.
-type ReadRuner interface {
+type RuneReader interface {
ReadRune() (rune int, size int, err os.Error)
}
diff --git a/src/pkg/xml/xml.go b/src/pkg/xml/xml.go
index 4d9c672d27..417b4edfde 100644
--- a/src/pkg/xml/xml.go
+++ b/src/pkg/xml/xml.go
@@ -163,7 +163,7 @@ type Parser struct {
// "quot": `"`,
Entity map[string]string
- r io.ReadByter
+ r io.ByteReader
buf bytes.Buffer
saved *bytes.Buffer
stk *stack
@@ -191,7 +191,7 @@ func NewParser(r io.Reader) *Parser {
// Assume that if reader has its own
// ReadByte, it's efficient enough.
// Otherwise, use bufio.
- if rb, ok := r.(io.ReadByter); ok {
+ if rb, ok := r.(io.ByteReader); ok {
p.r = rb
} else {
p.r = bufio.NewReader(r)