diff options
| author | Russ Cox <rsc@golang.org> | 2011-11-01 22:04:37 -0400 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2011-11-01 22:04:37 -0400 |
| commit | c2049d2dfeeea3d41fafa91e3e3f0e47c285355b (patch) | |
| tree | 090fd29206a707cf5a1f63eacaa414203d2b1ccb /src/pkg/html/parse.go | |
| parent | 68050ac76b94b58d962cf8265a8d4eb31ff35658 (diff) | |
| download | go-c2049d2dfeeea3d41fafa91e3e3f0e47c285355b.tar.xz | |
src/pkg/[a-m]*: gofix -r error -force=error
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/5322051
Diffstat (limited to 'src/pkg/html/parse.go')
| -rw-r--r-- | src/pkg/html/parse.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/pkg/html/parse.go b/src/pkg/html/parse.go index 54f7e2e8a5..c9f016588d 100644 --- a/src/pkg/html/parse.go +++ b/src/pkg/html/parse.go @@ -6,7 +6,6 @@ package html import ( "io" - "os" "strings" ) @@ -240,7 +239,7 @@ func (p *parser) reconstructActiveFormattingElements() { // read reads the next token. This is usually from the tokenizer, but it may // be the synthesized end tag implied by a self-closing tag. -func (p *parser) read() os.Error { +func (p *parser) read() error { if p.hasSelfClosingToken { p.hasSelfClosingToken = false p.tok.Type = EndTagToken @@ -1136,7 +1135,7 @@ func afterAfterBodyIM(p *parser) (insertionMode, bool) { // Parse returns the parse tree for the HTML from the given Reader. // The input is assumed to be UTF-8 encoded. -func Parse(r io.Reader) (*Node, os.Error) { +func Parse(r io.Reader) (*Node, error) { p := &parser{ tokenizer: NewTokenizer(r), doc: &Node{ @@ -1150,7 +1149,7 @@ func Parse(r io.Reader) (*Node, os.Error) { for { if consumed { if err := p.read(); err != nil { - if err == os.EOF { + if err == io.EOF { break } return nil, err |
