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

Function StringSource

policy/source.go:27–31  ·  view source on GitHub ↗

StringSource converts a string and location description to a model.Source.

(contents, location string)

Source from the content-addressed store, hash-verified

25
26// StringSource converts a string and location description to a model.Source.
27func StringSource(contents, location string) *Source {
28 return &Source{
29 Source: common.NewStringSource(contents, location),
30 }
31}
32
33// Source represents the contents of a single source file.
34type Source struct {

Callers 7

TestParseErrorFunction · 0.85
TestCustomTagVisitorFunction · 0.85
TestSimpleVariablesFunction · 0.85
ByteSourceFunction · 0.85
TestCompose_SourceInfoFunction · 0.85
TestCompose_UnnestFunction · 0.85

Calls 1

NewStringSourceFunction · 0.92

Tested by 6

TestParseErrorFunction · 0.68
TestCustomTagVisitorFunction · 0.68
TestSimpleVariablesFunction · 0.68
TestCompose_SourceInfoFunction · 0.68
TestCompose_UnnestFunction · 0.68