Sets returns a cel.EnvOption to configure namespaced set relationship functions. There is no set type within CEL, and while one may be introduced in the future, there are cases where a `list` type is known to behave like a set. For such cases, this library provides some basic functionality for dete
(options ...SetsOption)
| 76 | // sets.intersects([1], [1, 2]) // true |
| 77 | // sets.intersects([[1], [2, 3]], [[1, 2], [2, 3.0]]) // true |
| 78 | func Sets(options ...SetsOption) cel.EnvOption { |
| 79 | l := &setsLib{} |
| 80 | for _, o := range options { |
| 81 | l = o(l) |
| 82 | } |
| 83 | return cel.Lib(l) |
| 84 | } |
| 85 | |
| 86 | // SetsOption declares a functional operator for configuring set extensions. |
| 87 | type SetsOption func(*setsLib) *setsLib |