MCPcopy Create free account
hub / github.com/OpenListTeam/OpenList / switchToReader

Method switchToReader

server/webdav/internal/xml/xml.go:350–360  ·  view source on GitHub ↗
(r io.Reader)

Source from the content-addressed store, hash-verified

348}
349
350func (d *Decoder) switchToReader(r io.Reader) {
351 // Get efficient byte at a time reader.
352 // Assume that if reader has its own
353 // ReadByte, it's efficient enough.
354 // Otherwise, use bufio.
355 if rb, ok := r.(io.ByteReader); ok {
356 d.r = rb
357 } else {
358 d.r = bufio.NewReader(r)
359 }
360}
361
362// Parsing state - stack holds old name space translations
363// and the current set of open elements. The translations to pop when

Callers 2

NewDecoderFunction · 0.95
rawTokenMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected