• Sam Whited's avatar
    encoding/xml: fix token decoder on early EOF · a0593463
    Sam Whited authored
    The documentation for TokenReader suggests that implementations of the
    interface may return a token and io.EOF together, indicating that it is
    the last token in the stream. This is similar to io.Reader. However, if
    you wrap such a TokenReader in a Decoder it complained about the EOF.
    A test was added to ensure this behavior on Decoder's.
    
    Change-Id: I9083c91d9626180d3bcf5c069a017050f3c7c4a8
    Reviewed-on: https://go-review.googlesource.com/c/go/+/130556
    Run-TryBot: Sam Whited <sam@samwhited.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
    a0593463
xml.go 46.4 KB