MCPcopy Index your code
hub / github.com/XmirrorSecurity/OpenSCA-cli / switchToReader

Method switchToReader

opensca/sca/java/xml/xml.go:360–370  ·  view source on GitHub ↗
(r io.Reader)

Source from the content-addressed store, hash-verified

358}
359
360func (d *Decoder) switchToReader(r io.Reader) {
361 // Get efficient byte at a time reader.
362 // Assume that if reader has its own
363 // ReadByte, it's efficient enough.
364 // Otherwise, use bufio.
365 if rb, ok := r.(io.ByteReader); ok {
366 d.r = rb
367 } else {
368 d.r = bufio.NewReader(r)
369 }
370}
371
372// Parsing state - stack holds old name space translations
373// 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