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

Function genAttr

interpreter/attribute_patterns_test.go:324–338  ·  view source on GitHub ↗
(fac AttributeFactory, a attr)

Source from the content-addressed store, hash-verified

322}
323
324func genAttr(fac AttributeFactory, a attr) Attribute {
325 id := int64(1)
326 var attr Attribute
327 if a.unchecked {
328 attr = fac.MaybeAttribute(1, a.name)
329 } else {
330 attr = fac.AbsoluteAttribute(1, a.name)
331 }
332 for _, q := range a.quals {
333 qual, _ := fac.NewQualifier(nil, id, q, false)
334 attr.AddQualifier(qual)
335 id++
336 }
337 return attr
338}

Calls 4

AddQualifierMethod · 0.95
MaybeAttributeMethod · 0.65
AbsoluteAttributeMethod · 0.65
NewQualifierMethod · 0.65

Tested by

no test coverage detected