MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / stateObjectColon

Method stateObjectColon

pkg/util/json/tokenizer/decoder.go:148–160  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

146}
147
148func (d *Decoder) stateObjectColon() ([]byte, error) {
149 tok := d.scanner.Next()
150 if len(tok) < 1 {
151 return nil, io.ErrUnexpectedEOF
152 }
153 switch tok[0] {
154 case Colon:
155 d.state = (*Decoder).stateObjectValue
156 return d.NextToken()
157 default:
158 return tok, fmt.Errorf("stateObjectColon: expecting colon")
159 }
160}
161
162func (d *Decoder) stateObjectValue() ([]byte, error) {
163 tok := d.scanner.Next()

Callers

nothing calls this directly

Calls 3

NextTokenMethod · 0.95
ErrorfMethod · 0.80
NextMethod · 0.65

Tested by

no test coverage detected