(pass *analysis.Pass, expr ast.Expr)
| 475 | } |
| 476 | |
| 477 | func exprFormFor(pass *analysis.Pass, expr ast.Expr) exprForm { |
| 478 | text := exprString(expr) |
| 479 | if text == "" { |
| 480 | return exprForm{} |
| 481 | } |
| 482 | |
| 483 | ident, suffix, ok := rootIdentAndSuffix(expr) |
| 484 | if !ok { |
| 485 | return exprForm{text: text} |
| 486 | } |
| 487 | |
| 488 | return exprForm{ |
| 489 | text: text, |
| 490 | root: identObject(pass, ident), |
| 491 | suffix: suffix, |
| 492 | } |
| 493 | } |
| 494 | |
| 495 | func receiverForm(pass *analysis.Pass, decl *ast.FuncDecl) (exprForm, bool) { |
| 496 | if decl.Recv == nil || len(decl.Recv.List) == 0 { |
no test coverage detected