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

Method OffsetLocation

policy/source.go:61–67  ·  view source on GitHub ↗

OffsetLocation returns the absolute location given the relative offset, if found.

(offset int32)

Source from the content-addressed store, hash-verified

59
60// OffsetLocation returns the absolute location given the relative offset, if found.
61func (rel *RelativeSource) OffsetLocation(offset int32) (common.Location, bool) {
62 absOffset, found := rel.Source.LocationOffset(rel.absLoc)
63 if !found {
64 return common.NoLocation, false
65 }
66 return rel.Source.OffsetLocation(absOffset + offset)
67}

Callers

nothing calls this directly

Calls 2

LocationOffsetMethod · 0.65
OffsetLocationMethod · 0.65

Tested by

no test coverage detected