MCPcopy
hub / github.com/protocolbuffers/protobuf-go / consume

Method consume

internal/encoding/json/decode.go:265–275  ·  view source on GitHub ↗

consume consumes n bytes of input and any subsequent whitespace.

(n int)

Source from the content-addressed store, hash-verified

263
264// consume consumes n bytes of input and any subsequent whitespace.
265func (d *Decoder) consume(n int) {
266 d.in = d.in[n:]
267 for len(d.in) > 0 {
268 switch d.in[0] {
269 case ' ', '\n', '\r', '\t':
270 d.in = d.in[1:]
271 default:
272 return
273 }
274 }
275}
276
277// isValueNext returns true if next type should be a JSON value: Null,
278// Number, String or Bool.

Callers 5

ReadMethod · 0.95
parseNextMethod · 0.95
consumeTokenMethod · 0.95
consumeBoolTokenMethod · 0.95
consumeStringTokenMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected