1
0
mirror of https://github.com/golang/go synced 2024-11-19 22:44:45 -07:00

encoding/xml: document NewDecoder buffering

Fixes #7225

LGTM=r
R=golang-codereviews, r
CC=golang-codereviews, rsc
https://golang.org/cl/88710043
This commit is contained in:
Brad Fitzpatrick 2014-04-16 17:16:08 -07:00
parent 1f40b841b3
commit 877e0a135f

View File

@ -200,6 +200,8 @@ type Decoder struct {
} }
// NewDecoder creates a new XML parser reading from r. // NewDecoder creates a new XML parser reading from r.
// If r does not implement io.ByteReader, NewDecoder will
// do its own buffering.
func NewDecoder(r io.Reader) *Decoder { func NewDecoder(r io.Reader) *Decoder {
d := &Decoder{ d := &Decoder{
ns: make(map[string]string), ns: make(map[string]string),