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

Function AttributePattern

cel/program.go:112–114  ·  view source on GitHub ↗

AttributePattern returns an AttributePattern that matches a top-level variable. The pattern is mutable, and its methods support the specification of one or more qualifier patterns. For example, the AttributePattern(`a`).QualString(`b`) represents a variable access `a` with a string field or index q

(varName string)

Source from the content-addressed store, hash-verified

110// rules. Pick the fully qualified variable name that makes sense within the container as the
111// AttributePattern `varName` argument.
112func AttributePattern(varName string) *AttributePatternType {
113 return interpreter.NewAttributePattern(varName)
114}
115
116// AttributePatternType represents a top-level variable with an optional set of qualifier patterns.
117//

Callers 7

exercise8Function · 0.92
TestContextEvalUnknownsFunction · 0.70
TestResidualAstComplexFunction · 0.70
TestResidualAstMacrosFunction · 0.70
TestResidualAstModifiedFunction · 0.70

Calls 1

NewAttributePatternFunction · 0.92

Tested by 6

TestContextEvalUnknownsFunction · 0.56
TestResidualAstComplexFunction · 0.56
TestResidualAstMacrosFunction · 0.56
TestResidualAstModifiedFunction · 0.56