mirror of
https://github.com/golang/go
synced 2024-11-24 23:47:55 -07:00
encoding/xml: fix documentation for Decoder.Skip
Fixes #2850. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5645043
This commit is contained in:
parent
38b8f6c7a4
commit
749f228cbd
@ -542,10 +542,12 @@ Loop:
|
|||||||
panic("unreachable")
|
panic("unreachable")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Have already read a start element.
|
// Skip reads tokens until it has consumed the end element
|
||||||
// Read tokens until we find the end element.
|
// matching the most recent start element already consumed.
|
||||||
// Token is taking care of making sure the
|
// It recurs if it encounters a start element, so it can be used to
|
||||||
// end element matches the start element we saw.
|
// skip nested structures.
|
||||||
|
// It returns nil if it finds an end element matching the start
|
||||||
|
// element; otherwise it returns an error describing the problem.
|
||||||
func (d *Decoder) Skip() error {
|
func (d *Decoder) Skip() error {
|
||||||
for {
|
for {
|
||||||
tok, err := d.Token()
|
tok, err := d.Token()
|
||||||
|
Loading…
Reference in New Issue
Block a user