isTopName returns true if n is a top-level unresolved identifier with the given name.
(n ast.Expr, name string)
| 338 | |
| 339 | // isTopName returns true if n is a top-level unresolved identifier with the given name. |
| 340 | func isTopName(n ast.Expr, name string) bool { |
| 341 | id, ok := n.(*ast.Ident) |
| 342 | return ok && id.Name == name && id.Obj == nil |
| 343 | } |
| 344 | |
| 345 | // isName returns true if n is an identifier with the given name. |
| 346 | func isName(n ast.Expr, name string) bool { |
no outgoing calls
no test coverage detected