NewMap creates a CreateStruct instruction for a map where the map is comprised of the optional set of key, value entries.
(entries ...*exprpb.Expr_CreateStruct_Entry)
| 422 | // NewMap creates a CreateStruct instruction for a map where the map is comprised of the |
| 423 | // optional set of key, value entries. |
| 424 | func (ah *adaptingHelper) NewMap(entries ...*exprpb.Expr_CreateStruct_Entry) *exprpb.Expr { |
| 425 | adaptedEntries := make([]ast.EntryExpr, len(entries)) |
| 426 | for i, e := range entries { |
| 427 | adaptedEntries[i] = mustAdaptToEntryExpr(e) |
| 428 | } |
| 429 | return mustAdaptToProto(ah.modernHelper.NewMap(adaptedEntries...)) |
| 430 | } |
| 431 | |
| 432 | // NewMapEntry creates a Map Entry for the key, value pair. |
| 433 | func (ah *adaptingHelper) NewMapEntry(key *exprpb.Expr, val *exprpb.Expr, optional bool) *exprpb.Expr_CreateStruct_Entry { |
nothing calls this directly
no test coverage detected