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

Method syntaxError

encoding/protojson/decode.go:117–121  ·  view source on GitHub ↗

syntaxError returns a syntax error for given position.

(pos int, f string, x ...any)

Source from the content-addressed store, hash-verified

115
116// syntaxError returns a syntax error for given position.
117func (d decoder) syntaxError(pos int, f string, x ...any) error {
118 line, column := d.Position(pos)
119 head := fmt.Sprintf("syntax error (line %d:%d): ", line, column)
120 return errors.New(head+f, x...)
121}
122
123// unmarshalMessage unmarshals a message into the given protoreflect.Message.
124func (d decoder) unmarshalMessage(m protoreflect.Message, skipTypeURL bool) error {

Callers 1

unexpectedTokenErrorMethod · 0.95

Calls 2

NewFunction · 0.92
PositionMethod · 0.45

Tested by

no test coverage detected