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

Method OffsetLocation

common/source.go:149–152  ·  view source on GitHub ↗

OffsetLocation implements the Source interface method.

(offset int32)

Source from the content-addressed store, hash-verified

147
148// OffsetLocation implements the Source interface method.
149func (s *sourceImpl) OffsetLocation(offset int32) (Location, bool) {
150 line, lineOffset := s.findLine(offset)
151 return NewLocation(int(line), int(offset-lineOffset)), true
152}
153
154// Snippet implements the Source interface method.
155func (s *sourceImpl) Snippet(line int) (string, bool) {

Callers

nothing calls this directly

Calls 2

findLineMethod · 0.95
NewLocationFunction · 0.85

Tested by

no test coverage detected