]> Cypherpunks repositories - gostls13.git/commitdiff
xml: use io.ReadByter in place of local readByter
authorRaif S. Naffah <go@naffah-raif.name>
Sun, 28 Mar 2010 06:12:30 +0000 (23:12 -0700)
committerRuss Cox <rsc@golang.org>
Sun, 28 Mar 2010 06:12:30 +0000 (23:12 -0700)
R=cemeyer, rsc
CC=golang-dev
https://golang.org/cl/809041

src/pkg/xml/xml.go

index 796dce5828c3407b3b613e6a32bbc7ababdb83cb..3737fbec91f994647522b0c847dafc8a6de4a8a2 100644 (file)
@@ -107,10 +107,6 @@ type Directive []byte
 
 func (d Directive) Copy() Directive { return Directive(makeCopy(d)) }
 
-type readByter interface {
-       ReadByte() (b byte, err os.Error)
-}
-
 // CopyToken returns a copy of a Token.
 func CopyToken(t Token) Token {
        switch v := t.(type) {
@@ -167,7 +163,7 @@ type Parser struct {
        //
        Entity map[string]string
 
-       r         readByter
+       r         io.ReadByter
        buf       bytes.Buffer
        stk       *stack
        free      *stack
@@ -194,7 +190,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.(readByter); ok {
+       if rb, ok := r.(io.ReadByter); ok {
                p.r = rb
        } else {
                p.r = bufio.NewReader(r)