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

Function locationCode

policy/test/cel_test_runner.go:42–51  ·  view source on GitHub ↗
(ip ref.Val)

Source from the content-addressed store, hash-verified

40}
41
42func locationCode(ip ref.Val) ref.Val {
43 switch ip.(types.String) {
44 case "10.0.0.1":
45 return types.String("us")
46 case "10.0.0.2":
47 return types.String("de")
48 default:
49 return types.String("ir")
50 }
51}

Callers

nothing calls this directly

Calls 1

StringTypeAlias · 0.92

Tested by

no test coverage detected