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

Method Fields

common/ast/navigable.go:549–564  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

547}
548
549func (s navigableStructImpl) Fields() []EntryExpr {
550 fieldInits := s.Expr.AsStruct().Fields()
551 fields := make([]EntryExpr, len(fieldInits))
552 for i, f := range fieldInits {
553 field := f.AsStructField()
554 fields[i] = &entryExpr{
555 id: f.ID(),
556 entryExprKindCase: navigableFieldImpl{
557 name: field.Name(),
558 val: s.createChild(field.Value()),
559 isOpt: field.IsOptional(),
560 },
561 }
562 }
563 return fields
564}
565
566type navigableFieldImpl struct {
567 name string

Callers

nothing calls this directly

Calls 8

createChildMethod · 0.80
FieldsMethod · 0.65
AsStructMethod · 0.65
AsStructFieldMethod · 0.65
IDMethod · 0.65
NameMethod · 0.65
ValueMethod · 0.65
IsOptionalMethod · 0.65

Tested by

no test coverage detected