(factory ExprFactory, id int64, s *exprpb.Expr_CreateStruct)
| 224 | } |
| 225 | |
| 226 | func exprMap(factory ExprFactory, id int64, s *exprpb.Expr_CreateStruct) (Expr, error) { |
| 227 | entries := make([]EntryExpr, len(s.GetEntries())) |
| 228 | var err error |
| 229 | for i, entry := range s.GetEntries() { |
| 230 | entries[i], err = exprMapEntry(factory, entry.GetId(), entry) |
| 231 | if err != nil { |
| 232 | return nil, err |
| 233 | } |
| 234 | } |
| 235 | return factory.NewMap(id, entries), nil |
| 236 | } |
| 237 | |
| 238 | func exprMapEntry(factory ExprFactory, id int64, e *exprpb.Expr_CreateStruct_Entry) (EntryExpr, error) { |
| 239 | k, err := exprInternal(factory, e.GetMapKey()) |
no test coverage detected