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)
| 120 | // will be configured on the environment which means only the StdLibSubset() initially configured with |
| 121 | // the library will be used. |
| 122 | func 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. |
| 130 | func StdLib(opts ...StdLibOption) EnvOption { |
no outgoing calls