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

Method mustgetc

server/webdav/internal/xml/xml.go:930–937  ·  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

928// set d.err to SyntaxError("unexpected EOF")
929// and return ok==false
930func (d *Decoder) mustgetc() (b byte, ok bool) {
931 if b, ok = d.getc(); !ok {
932 if d.err == io.EOF {
933 d.err = d.syntaxError("unexpected EOF")
934 }
935 }
936 return
937}
938
939// Unread a single byte.
940func (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