]> Cypherpunks repositories - gostls13.git/commitdiff
io: rename interfaces
authorRobert Griesemer <gri@golang.org>
Wed, 2 Feb 2011 21:42:15 +0000 (13:42 -0800)
committerRobert Griesemer <gri@golang.org>
Wed, 2 Feb 2011 21:42:15 +0000 (13:42 -0800)
ReadByter -> ByteReader
ReadRuner -> RuneReader

R=r, r2, rsc
CC=golang-dev
https://golang.org/cl/4023062

src/pkg/io/io.go
src/pkg/xml/xml.go

index b88c213c81a416b521f6c507a92c04291e558bf2..3b8791897988399a7c9a7ec7db0373ef105a59a2 100644 (file)
@@ -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)
 }
 
index 4d9c672d273ecc20d26dd9caf723f52d646bfe3b..417b4edfde0926cc8dc530621b2f3f64d1617765 100644 (file)
@@ -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)