(e ast.Expr)
| 615 | } |
| 616 | |
| 617 | func (c *coster) costCreateStruct(e ast.Expr) CostEstimate { |
| 618 | msgVal := e.AsStruct() |
| 619 | var sum CostEstimate |
| 620 | for _, ent := range msgVal.Fields() { |
| 621 | field := ent.AsStructField() |
| 622 | sum = sum.Add(c.cost(field.Value())) |
| 623 | } |
| 624 | return sum.Add(createMessageBaseCost) |
| 625 | } |
| 626 | |
| 627 | func (c *coster) costComprehension(e ast.Expr) CostEstimate { |
| 628 | comp := e.AsComprehension() |