mirror of
https://github.com/golang/go
synced 2024-10-02 12:18:33 -06:00
html: fix doc after Err method name change
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5411045
This commit is contained in:
parent
9bfe9dfde7
commit
f6279b46f8
@ -37,7 +37,7 @@ lower-cased, and attributes are collected into a []Attribute. For example:
|
|||||||
for {
|
for {
|
||||||
if z.Next() == html.ErrorToken {
|
if z.Next() == html.ErrorToken {
|
||||||
// Returning io.EOF indicates success.
|
// Returning io.EOF indicates success.
|
||||||
return z.Error()
|
return z.Err()
|
||||||
}
|
}
|
||||||
emitToken(z.Token())
|
emitToken(z.Token())
|
||||||
}
|
}
|
||||||
@ -51,7 +51,7 @@ call to Next. For example, to extract an HTML page's anchor text:
|
|||||||
tt := z.Next()
|
tt := z.Next()
|
||||||
switch tt {
|
switch tt {
|
||||||
case ErrorToken:
|
case ErrorToken:
|
||||||
return z.Error()
|
return z.Err()
|
||||||
case TextToken:
|
case TextToken:
|
||||||
if depth > 0 {
|
if depth > 0 {
|
||||||
// emitBytes should copy the []byte it receives,
|
// emitBytes should copy the []byte it receives,
|
||||||
|
Loading…
Reference in New Issue
Block a user