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

Function locationCodeEnvOption

policy/test/cel_test_runner.go:36–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34}
35
36func locationCodeEnvOption() cel.EnvOption {
37 return cel.Function("locationCode",
38 cel.Overload("locationCode_string", []*cel.Type{cel.StringType}, cel.StringType,
39 cel.UnaryBinding(locationCode)))
40}
41
42func locationCode(ip ref.Val) ref.Val {
43 switch ip.(types.String) {

Callers 1

TestCELFunction · 0.70

Calls 3

FunctionFunction · 0.92
OverloadFunction · 0.92
UnaryBindingFunction · 0.92

Tested by 1

TestCELFunction · 0.56