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

Method mustgetc

opensca/sca/java/xml/xml.go:952–959  ·  view source on GitHub ↗

Must read a single byte. If there is no byte to read, set d.err to SyntaxError("unexpected EOF") and return ok==false

()

Source from the content-addressed store, hash-verified

950// set d.err to SyntaxError("unexpected EOF")
951// and return ok==false
952func (d *Decoder) mustgetc() (b byte, ok bool) {
953 if b, ok = d.getc(); !ok {
954 if d.err == io.EOF {
955 d.err = d.syntaxError("unexpected EOF")
956 }
957 }
958 return
959}
960
961// Unread a single byte.
962func (d *Decoder) ungetc(b byte) {

Callers 4

rawTokenMethod · 0.95
attrvalMethod · 0.95
textMethod · 0.95
readNameMethod · 0.95

Calls 2

getcMethod · 0.95
syntaxErrorMethod · 0.95

Tested by

no test coverage detected