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

Function AttributePattern

cel/program.go:129–131  ·  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

127// rules. Pick the fully qualified variable name that makes sense within the container as the
128// AttributePattern `varName` argument.
129func AttributePattern(varName string) *AttributePatternType {
130 return interpreter.NewAttributePattern(varName)
131}
132
133// AttributePatternType represents a top-level variable with an optional set of qualifier patterns.
134//

Calls 1

NewAttributePatternFunction · 0.92