(id int64, m MapExpr)
| 436 | } |
| 437 | |
| 438 | func protoMap(id int64, m MapExpr) (*exprpb.Expr, error) { |
| 439 | entries := make([]*exprpb.Expr_CreateStruct_Entry, len(m.Entries())) |
| 440 | var err error |
| 441 | for i, e := range m.Entries() { |
| 442 | entries[i], err = EntryExprToProto(e) |
| 443 | if err != nil { |
| 444 | return nil, err |
| 445 | } |
| 446 | } |
| 447 | return &exprpb.Expr{ |
| 448 | Id: id, |
| 449 | ExprKind: &exprpb.Expr_StructExpr{ |
| 450 | StructExpr: &exprpb.Expr_CreateStruct{ |
| 451 | Entries: entries, |
| 452 | }, |
| 453 | }, |
| 454 | }, nil |
| 455 | } |
| 456 | |
| 457 | func protoMapEntry(id int64, e MapEntry) (*exprpb.Expr_CreateStruct_Entry, error) { |
| 458 | k, err := ExprToProto(e.Key()) |
no test coverage detected