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

Function extractIdent

ext/guards.go:53–60  ·  view source on GitHub ↗
(target ast.Expr)

Source from the content-addressed store, hash-verified

51}
52
53func extractIdent(target ast.Expr) (string, bool) {
54 switch target.Kind() {
55 case ast.IdentKind:
56 return target.AsIdent(), true
57 default:
58 return "", false
59 }
60}
61
62func macroTargetMatchesNamespace(ns string, target ast.Expr) bool {
63 if id, found := extractIdent(target); found {

Callers 2

extractIterVarFunction · 0.70

Calls 2

KindMethod · 0.65
AsIdentMethod · 0.65

Tested by

no test coverage detected