Protos returns a cel.EnvOption to configure extended macros and functions for proto manipulation. Note, all macros use the 'proto' namespace; however, at the time of macro expansion the namespace looks just like any other identifier. If you are currently using a variable named 'proto', the macro wi
(options ...ProtosOption)
| 52 | // |
| 53 | // proto.hasExt(msg, google.expr.proto2.test.int32_ext) // returns true || false |
| 54 | func Protos(options ...ProtosOption) cel.EnvOption { |
| 55 | l := &protoLib{version: math.MaxUint32} |
| 56 | for _, o := range options { |
| 57 | l = o(l) |
| 58 | } |
| 59 | return cel.Lib(l) |
| 60 | } |
| 61 | |
| 62 | // ProtosOption declares a functional operator for configuring protobuf utilities. |
| 63 | type ProtosOption func(*protoLib) *protoLib |