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

Function StdLibSubset

cel/library.go:122–127  ·  view source on GitHub ↗

StdLibSubset configures the standard library to use a subset of its functions and macros. Since the StdLib is a singleton library, only the first instance of the StdLib() environment options will be configured on the environment which means only the StdLibSubset() initially configured with the libr

(subset *env.LibrarySubset)

Source from the content-addressed store, hash-verified

120// will be configured on the environment which means only the StdLibSubset() initially configured with
121// the library will be used.
122func StdLibSubset(subset *env.LibrarySubset) StdLibOption {
123 return func(lib *stdLibrary) *stdLibrary {
124 lib.subset = subset
125 return lib
126 }
127}
128
129// StdLib returns an EnvOption for the standard library of CEL functions and macros.
130func StdLib(opts ...StdLibOption) EnvOption {

Callers 7

configToEnvOptionsFunction · 0.85
TestPromptTemplateFunction · 0.85
TestSubsetStdLibFunction · 0.85
TestSubsetStdLibErrorFunction · 0.85
TestSubsetStdLibMergeFunction · 0.85

Calls

no outgoing calls

Tested by 6

TestPromptTemplateFunction · 0.68
TestSubsetStdLibFunction · 0.68
TestSubsetStdLibErrorFunction · 0.68
TestSubsetStdLibMergeFunction · 0.68