diff --git a/cmd/guru/describe.go b/cmd/guru/describe.go index 49a096b4..125e4097 100644 --- a/cmd/guru/describe.go +++ b/cmd/guru/describe.go @@ -162,6 +162,9 @@ func findInterestingNode(pkginfo *loader.PackageInfo, path []ast.Node) ([]ast.No path = append([]ast.Node{n.Name}, path...) continue + case *ast.Comment, *ast.CommentGroup, *ast.File, *ast.KeyValueExpr, *ast.CommClause: + return path, actionUnknown // uninteresting + case ast.Stmt: return path, actionStmt @@ -173,9 +176,6 @@ func findInterestingNode(pkginfo *loader.PackageInfo, path []ast.Node) ([]ast.No *ast.ChanType: return path, actionType - case *ast.Comment, *ast.CommentGroup, *ast.File, *ast.KeyValueExpr, *ast.CommClause: - return path, actionUnknown // uninteresting - case *ast.Ellipsis: // Continue to enclosing node. // e.g. [...]T in ArrayType