MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / setReader

Method setReader

xmlparser/decoder.go:158–161  ·  view source on GitHub ↗

setReader sets a new reader for the decoder, wrapping it in a bufio.Reader from the pool.

(r io.Reader)

Source from the content-addressed store, hash-verified

156
157// setReader sets a new reader for the decoder, wrapping it in a bufio.Reader from the pool.
158func (d *Decoder) setReader(r io.Reader) {
159 d.r = bufreaderPool.Get().(*bufio.Reader)
160 d.r.Reset(r)
161}
162
163// setEncoding recreates the reader with the specified encoding.
164func (d *Decoder) setEncoding(encoding string) bool {

Callers 2

NewDecoderFunction · 0.95
setEncodingMethod · 0.95

Calls 2

ResetMethod · 0.80
GetMethod · 0.65

Tested by

no test coverage detected