Remap EOF to ErrUnexpectedEOF now we're checking for end of stream.
This commit is contained in:
parent
6b01a7f10c
commit
b752357c8d
|
|
@ -104,6 +104,9 @@ func (stream *Stream) Next(match *xml.Name) (*xml.StartElement, error) {
|
|||
for {
|
||||
t, err := stream.dec.Token()
|
||||
if err != nil {
|
||||
if err == io.EOF {
|
||||
err = io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
switch e := t.(type) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue