summaryrefslogtreecommitdiff
path: root/src/pkg/xml/xml.go
diff options
context:
space:
mode:
authorRaif S. Naffah <go@naffah-raif.name>2010-03-27 23:12:30 -0700
committerRaif S. Naffah <go@naffah-raif.name>2010-03-27 23:12:30 -0700
commitb5e9ad29d3c3ecd81cd7587d7f462083073266f1 (patch)
tree764ff5cb2157c2ad8a76e8b473e57204ca0ebff4 /src/pkg/xml/xml.go
parenteb9dd32a3e8ea1e17692a4d3891767207c1595e4 (diff)
downloadgolang-b5e9ad29d3c3ecd81cd7587d7f462083073266f1.tar.gz
xml: use io.ReadByter in place of local readByter
R=cemeyer, rsc CC=golang-dev http://codereview.appspot.com/809041 Committer: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/pkg/xml/xml.go')
-rw-r--r--src/pkg/xml/xml.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/pkg/xml/xml.go b/src/pkg/xml/xml.go
index 796dce582..3737fbec9 100644
--- a/src/pkg/xml/xml.go
+++ b/src/pkg/xml/xml.go
@@ -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)