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

Function locationCode

tools/celtest/test_runner_test.go:89–98  ·  view source on GitHub ↗
(ip ref.Val)

Source from the content-addressed store, hash-verified

87}
88
89func locationCode(ip ref.Val) ref.Val {
90 switch ip.(types.String) {
91 case "10.0.0.1":
92 return types.String("us")
93 case "10.0.0.2":
94 return types.String("de")
95 default:
96 return types.String("ir")
97 }
98}
99
100func k8sParserOpts() policy.ParserOption {
101 return func(p *policy.Parser) (*policy.Parser, error) {

Callers

nothing calls this directly

Calls 1

StringTypeAlias · 0.92

Tested by

no test coverage detected