(operand ast.Expr, testOnly bool, op string, field string)
| 414 | } |
| 415 | |
| 416 | func (un *unparser) visitSelectInternal(operand ast.Expr, testOnly bool, op string, field string) error { |
| 417 | // handle the case when the select expression was generated by the has() macro. |
| 418 | if testOnly { |
| 419 | un.str.WriteString("has(") |
| 420 | } |
| 421 | nested := !testOnly && isBinaryOrTernaryOperator(operand) |
| 422 | err := un.visitMaybeNested(operand, nested) |
| 423 | if err != nil { |
| 424 | return err |
| 425 | } |
| 426 | un.str.WriteString(op) |
| 427 | un.str.WriteString(un.maybeQuoteField(field)) |
| 428 | if testOnly { |
| 429 | un.str.WriteString(")") |
| 430 | } |
| 431 | return nil |
| 432 | } |
| 433 | |
| 434 | func (un *unparser) visitStructMsg(expr ast.Expr) error { |
| 435 | m := expr.AsStruct() |
no test coverage detected