Encoders returns a cel.EnvOption to configure extended functions for string, byte, and object encodings. # Base64.Decode Decodes base64-encoded string to bytes. This function will return an error if the string input is not base64-encoded. base64.decode( ) -> Examples: base64.d
(options ...EncodersOption)
| 67 | // |
| 68 | // json.encode({'hello': 'world'}) // return '{"hello":"world"}' |
| 69 | func Encoders(options ...EncodersOption) cel.EnvOption { |
| 70 | l := &encoderLib{version: math.MaxUint32} |
| 71 | for _, o := range options { |
| 72 | l = o(l) |
| 73 | } |
| 74 | return cel.Lib(l) |
| 75 | } |
| 76 | |
| 77 | // EncodersOption declares a functional operator for configuring encoder extensions. |
| 78 | type EncodersOption func(*encoderLib) *encoderLib |