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

Method syntaxError

encoding/prototext/decode.go:99–103  ·  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

97
98// syntaxError returns a syntax error for given position.
99func (d decoder) syntaxError(pos int, f string, x ...any) error {
100 line, column := d.Position(pos)
101 head := fmt.Sprintf("syntax error (line %d:%d): ", line, column)
102 return errors.New(head+f, x...)
103}
104
105// unmarshalMessage unmarshals into the given protoreflect.Message.
106func (d decoder) unmarshalMessage(m protoreflect.Message, checkDelims bool) error {

Callers 4

unexpectedTokenErrorMethod · 0.95
unmarshalMessageMethod · 0.95
unmarshalMapEntryMethod · 0.95
unmarshalAnyMethod · 0.95

Calls 2

NewFunction · 0.92
PositionMethod · 0.45

Tested by

no test coverage detected