Must read a single byte. If there is no byte to read, set d.err to SyntaxError("unexpected EOF") and return ok==false
()
| 950 | // set d.err to SyntaxError("unexpected EOF") |
| 951 | // and return ok==false |
| 952 | func (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. |
| 962 | func (d *Decoder) ungetc(b byte) { |