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

Method readName

xmlparser/decoder.go:630–638  ·  view source on GitHub ↗

readName reads a name (tag or attribute) to the buffer until a non-name byte is encountered.

()

Source from the content-addressed store, hash-verified

628
629// readName reads a name (tag or attribute) to the buffer until a non-name byte is encountered.
630func (d *Decoder) readName() bool {
631 d.buf.Reset()
632
633 if !d.mustReadWhileFn(isNameByte) {
634 return false
635 }
636
637 return d.buf.Len() > 0
638}
639
640func isNameByte(c byte) bool {
641 // We allow all non-ASCII bytes as names.

Callers 2

readProcInstMethod · 0.95
readNSNameMethod · 0.95

Calls 3

mustReadWhileFnMethod · 0.95
ResetMethod · 0.80
LenMethod · 0.45

Tested by

no test coverage detected