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

Function NewInfoSource

common/source.go:112–118  ·  view source on GitHub ↗

NewInfoSource creates a new Source from a SourceInfo.

(info *exprpb.SourceInfo)

Source from the content-addressed store, hash-verified

110
111// NewInfoSource creates a new Source from a SourceInfo.
112func NewInfoSource(info *exprpb.SourceInfo) Source {
113 return &sourceImpl{
114 Buffer: runes.NewBuffer(""),
115 description: info.GetLocation(),
116 lineOffsets: info.GetLineOffsets(),
117 }
118}
119
120// Content implements the Source interface method.
121func (s *sourceImpl) Content() string {

Callers 2

Calls 2

NewBufferFunction · 0.92
GetLocationMethod · 0.65

Tested by 1