(target ast.Expr)
| 51 | } |
| 52 | |
| 53 | func extractIdent(target ast.Expr) (string, bool) { |
| 54 | switch target.Kind() { |
| 55 | case ast.IdentKind: |
| 56 | return target.AsIdent(), true |
| 57 | default: |
| 58 | return "", false |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | func macroTargetMatchesNamespace(ns string, target ast.Expr) bool { |
| 63 | if id, found := extractIdent(target); found { |
no test coverage detected