MCPcopy Create free account
hub / github.com/ory/keto / ToProto

Method ToProto

schema/parse_errors.go:82–96  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

80 }
81}
82func (e *ParseError) ToProto() *opl.ParseError {
83 start := e.toSrcPos(e.item.Start)
84 end := e.toSrcPos(e.item.End)
85 return &opl.ParseError{
86 Message: e.msg,
87 Start: &opl.SourcePosition{
88 Line: clampUint32(start.Line),
89 Column: clampUint32(start.Col),
90 },
91 End: &opl.SourcePosition{
92 Line: clampUint32(end.Line),
93 Column: clampUint32(end.Col),
94 },
95 }
96}
97
98// toSrcPos converts the given position in the input to a Line and column
99// number.

Callers

nothing calls this directly

Calls 2

toSrcPosMethod · 0.95
clampUint32Function · 0.85

Tested by

no test coverage detected