MCPcopy Create free account
hub / github.com/cel-expr/cel-go / LocationOffset

Method LocationOffset

common/source.go:136–141  ·  view source on GitHub ↗

LocationOffset implements the Source interface method.

(location Location)

Source from the content-addressed store, hash-verified

134
135// LocationOffset implements the Source interface method.
136func (s *sourceImpl) LocationOffset(location Location) (int32, bool) {
137 if lineOffset, found := s.findLineOffset(location.Line()); found {
138 return lineOffset + int32(location.Column()), true
139 }
140 return -1, false
141}
142
143// NewLocation implements the Source interface method.
144func (s *sourceImpl) NewLocation(line, col int) Location {

Callers

nothing calls this directly

Calls 3

findLineOffsetMethod · 0.95
LineMethod · 0.65
ColumnMethod · 0.65

Tested by

no test coverage detected