diff --git a/gopls/internal/lsp/source/symbols_gox.go b/gopls/internal/lsp/source/symbols_gox.go index d4f71c0cffe..6e83dd37426 100644 --- a/gopls/internal/lsp/source/symbols_gox.go +++ b/gopls/internal/lsp/source/symbols_gox.go @@ -25,7 +25,7 @@ func GopDocumentSymbols(ctx context.Context, snapshot Snapshot, fh FileHandle) ( return nil, fmt.Errorf("getting file for GopDocumentSymbols: %w", err) } file := pgf.File - classType, isTest := parserutil.GetClassType(file, fh.URI().Filename()) + classType, _ := parserutil.GetClassType(file, fh.URI().Filename()) // Build symbols for file declarations. When encountering a declaration with // errors (typically because positions are invalid), we skip the declaration // entirely. VS Code fails to show any symbols if one of the top-level @@ -50,9 +50,6 @@ func GopDocumentSymbols(ctx context.Context, snapshot Snapshot, fh FileHandle) ( name = "Main" } } - if decl.Shadow && name == "Main" && isTest { - name = "TestMain" //test gox file - } if !decl.IsClass && decl.Recv != nil && len(decl.Recv.List) > 0 { fs.Name = fmt.Sprintf("(%s).%s", typesutil.ExprString(decl.Recv.List[0].Type), fs.Name) } else {