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)
| 131 | // will be configured on the environment which means only the StdLibSubset() initially configured with |
| 132 | // the library will be used. |
| 133 | func StdLibSubset(subset *env.LibrarySubset) StdLibOption { |
| 134 | return func(lib *stdLibrary) *stdLibrary { |
| 135 | lib.subset = subset |
| 136 | return lib |
| 137 | } |
| 138 | } |
| 139 | |
| 140 | // StdLib returns an EnvOption for the standard library of CEL functions and macros. |
| 141 | func StdLib(opts ...StdLibOption) EnvOption { |
no outgoing calls