MCPcopy Create free account
hub / github.com/cel-expr/cel-go / Encoders

Function Encoders

ext/encoders.go:66–72  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

64//
65// json.encode({'hello': 'world'}) // return '{"hello":"world"}'
66func Encoders(options ...EncodersOption) cel.EnvOption {
67 l := &encoderLib{version: math.MaxUint32}
68 for _, o := range options {
69 l = o(l)
70 }
71 return cel.Lib(l)
72}
73
74// EncodersOption declares a functional operator for configuring encoder extensions.
75type EncodersOption func(*encoderLib) *encoderLib

Callers 5

initFunction · 0.92
evaluator.goFile · 0.92
TestEncodersFunction · 0.85
TestEncodersVersionFunction · 0.85

Calls 1

LibFunction · 0.92

Tested by 3

initFunction · 0.74
TestEncodersFunction · 0.68
TestEncodersVersionFunction · 0.68