diff --git a/go/analysis/unitchecker/export_test.go b/go/analysis/unitchecker/export_test.go index 04eacc47576..d436a951848 100644 --- a/go/analysis/unitchecker/export_test.go +++ b/go/analysis/unitchecker/export_test.go @@ -4,6 +4,7 @@ package unitchecker +/* import ( "go/token" "go/types" @@ -24,3 +25,4 @@ func SetTypeImportExport( makeTypesImporter = MakeTypesImporter exportTypes = ExportTypes } +*/ diff --git a/go/analysis/unitchecker/separate_test.go b/go/analysis/unitchecker/separate_test.go index cf0143f8203..072adaa598a 100644 --- a/go/analysis/unitchecker/separate_test.go +++ b/go/analysis/unitchecker/separate_test.go @@ -7,7 +7,7 @@ package unitchecker_test // This file illustrates separate analysis with an example. - +/* import ( "bytes" "encoding/json" @@ -309,3 +309,4 @@ func extractTxtar(ar *txtar.Archive, dir string) error { } return nil } +*/ diff --git a/gopls/goxls/cmd/goxls/goxls_app.go b/gopls/goxls/cmd/goxls/goxls_app.go index fc092df5fbb..1eee9b3e1f1 100644 --- a/gopls/goxls/cmd/goxls/goxls_app.go +++ b/gopls/goxls/cmd/goxls/goxls_app.go @@ -7,5 +7,5 @@ package main import "golang.org/x/tools/gopls/goxls" func main() { - goxls.Main(nil, nil) + goxls.Main() } diff --git a/gopls/goxls/goxls.go b/gopls/goxls/goxls.go index b84775cd269..2d1e3d241ab 100644 --- a/gopls/goxls/goxls.go +++ b/gopls/goxls/goxls.go @@ -4,6 +4,7 @@ package goxls +/* import ( "context" "io" @@ -21,3 +22,17 @@ func Main(in io.ReadCloser, out io.WriteCloser) { app.Serve.Out = out tool.Main(ctx, app, os.Args[1:]) } +*/ +import ( + "context" + "os" + + "golang.org/x/tools/gopls/internal/hooks" + "golang.org/x/tools/gopls/internal/lsp/cmd" + "golang.org/x/tools/internal/tool" +) + +func Main() { + ctx := context.Background() + tool.Main(ctx, cmd.New("goxls", "", nil, hooks.Options), os.Args[1:]) +} diff --git a/gopls/internal/goxls/astutil/astutil.go b/gopls/internal/_goxls/astutil/astutil.go similarity index 100% rename from gopls/internal/goxls/astutil/astutil.go rename to gopls/internal/_goxls/astutil/astutil.go diff --git a/gopls/internal/goxls/astutil/purge.go b/gopls/internal/_goxls/astutil/purge.go similarity index 100% rename from gopls/internal/goxls/astutil/purge.go rename to gopls/internal/_goxls/astutil/purge.go diff --git a/gopls/internal/goxls/goputil/goputil.go b/gopls/internal/_goxls/goputil/goputil.go similarity index 100% rename from gopls/internal/goxls/goputil/goputil.go rename to gopls/internal/_goxls/goputil/goputil.go diff --git a/gopls/internal/goxls/packages/gengo.go b/gopls/internal/_goxls/packages/gengo.go similarity index 100% rename from gopls/internal/goxls/packages/gengo.go rename to gopls/internal/_goxls/packages/gengo.go diff --git a/gopls/internal/goxls/packages/packages.go b/gopls/internal/_goxls/packages/packages.go similarity index 100% rename from gopls/internal/goxls/packages/packages.go rename to gopls/internal/_goxls/packages/packages.go diff --git a/gopls/internal/goxls/packagesinternal/pkgs.go b/gopls/internal/_goxls/packagesinternal/pkgs.go similarity index 100% rename from gopls/internal/goxls/packagesinternal/pkgs.go rename to gopls/internal/_goxls/packagesinternal/pkgs.go diff --git a/gopls/internal/goxls/parserutil/parser_util.go b/gopls/internal/_goxls/parserutil/parser_util.go similarity index 100% rename from gopls/internal/goxls/parserutil/parser_util.go rename to gopls/internal/_goxls/parserutil/parser_util.go diff --git a/gopls/internal/goxls/typeparams/normalize.go b/gopls/internal/_goxls/typeparams/normalize.go similarity index 100% rename from gopls/internal/goxls/typeparams/normalize.go rename to gopls/internal/_goxls/typeparams/normalize.go diff --git a/gopls/internal/goxls/typeparams/typeparams.go b/gopls/internal/_goxls/typeparams/typeparams.go similarity index 100% rename from gopls/internal/goxls/typeparams/typeparams.go rename to gopls/internal/_goxls/typeparams/typeparams.go diff --git a/gopls/internal/goxls/typesutil/eval.go b/gopls/internal/_goxls/typesutil/eval.go similarity index 100% rename from gopls/internal/goxls/typesutil/eval.go rename to gopls/internal/_goxls/typesutil/eval.go diff --git a/gopls/internal/goxls/typesutil/typesutil.go b/gopls/internal/_goxls/typesutil/typesutil.go similarity index 100% rename from gopls/internal/goxls/typesutil/typesutil.go rename to gopls/internal/_goxls/typesutil/typesutil.go diff --git a/gopls/internal/lsp/cache/filemap.go b/gopls/internal/lsp/cache/filemap.go index 52b7a13ba95..9cc57dffbca 100644 --- a/gopls/internal/lsp/cache/filemap.go +++ b/gopls/internal/lsp/cache/filemap.go @@ -4,6 +4,7 @@ package cache +/* import ( "path/filepath" @@ -149,3 +150,4 @@ func (m *fileMap) Dirs() *persistent.Set[string] { } return m.dirs } +*/ diff --git a/gopls/internal/lsp/cache/filemap_test.go b/gopls/internal/lsp/cache/filemap_test.go index 3d5bab41c67..8a49f2203b6 100644 --- a/gopls/internal/lsp/cache/filemap_test.go +++ b/gopls/internal/lsp/cache/filemap_test.go @@ -4,6 +4,7 @@ package cache +/* import ( "path/filepath" "sort" @@ -106,3 +107,4 @@ func TestFileMap(t *testing.T) { }) } } +*/ diff --git a/gopls/internal/lsp/cache/parse_cache_gox.go b/gopls/internal/lsp/cache/parse_cache_gox.go index c51e18bf723..0612bcd7827 100644 --- a/gopls/internal/lsp/cache/parse_cache_gox.go +++ b/gopls/internal/lsp/cache/parse_cache_gox.go @@ -4,6 +4,7 @@ package cache +/* import ( "bytes" "container/heap" @@ -205,3 +206,4 @@ func (c *parseCache) parseGopFiles(ctx context.Context, fset *token.FileSet, mod return pgfs, firstErr } +*/ diff --git a/gopls/internal/lsp/cache/parse_gox.go b/gopls/internal/lsp/cache/parse_gox.go index 65b51fea7ca..3ce9b2705e6 100644 --- a/gopls/internal/lsp/cache/parse_gox.go +++ b/gopls/internal/lsp/cache/parse_gox.go @@ -4,6 +4,7 @@ package cache +/* import ( "context" "fmt" @@ -157,3 +158,4 @@ func fixGopAST(n ast.Node, tok *token.File, src []byte) (fixes []fixType) { func fixGopSrc(f *ast.File, tf *token.File, src []byte) (newSrc []byte, fix fixType) { return nil, noFix } +*/ diff --git a/gopls/internal/lsp/cache/pkg_gox.go b/gopls/internal/lsp/cache/pkg_gox.go index 03c23325f53..58d923b2dd4 100644 --- a/gopls/internal/lsp/cache/pkg_gox.go +++ b/gopls/internal/lsp/cache/pkg_gox.go @@ -4,6 +4,7 @@ package cache +/* import ( "fmt" @@ -29,3 +30,4 @@ func (pkg *syntaxPackage) GopFile(uri span.URI) (*source.ParsedGopFile, error) { } return nil, fmt.Errorf("no parsed file for %s in %v", uri, pkg.id) } +*/ diff --git a/gopls/internal/lsp/cache/snapshot_gox.go b/gopls/internal/lsp/cache/snapshot_gox.go index 4b3a094419e..542f190bfe5 100644 --- a/gopls/internal/lsp/cache/snapshot_gox.go +++ b/gopls/internal/lsp/cache/snapshot_gox.go @@ -4,6 +4,7 @@ package cache +/* import ( "golang.org/x/tools/gopls/internal/goxls/goputil" "golang.org/x/tools/gopls/internal/lsp/source" @@ -12,3 +13,4 @@ import ( func checkGopFile(fh source.FileHandle, fext string) bool { return goputil.FileKind(fext) != 0 } +*/ diff --git a/gopls/internal/lsp/cmd/serve_gox.go b/gopls/internal/lsp/cmd/serve_gox.go index 24430ea7e09..d9a34a4d1dc 100644 --- a/gopls/internal/lsp/cmd/serve_gox.go +++ b/gopls/internal/lsp/cmd/serve_gox.go @@ -4,6 +4,7 @@ package cmd +/* import ( "io" "os" @@ -22,3 +23,4 @@ func (s *Serve) reqOut() io.WriteCloser { } return os.Stdout } +*/ diff --git a/gopls/internal/lsp/prompt.go b/gopls/internal/lsp/prompt.go index 976f7c6e09f..1a026c5478a 100644 --- a/gopls/internal/lsp/prompt.go +++ b/gopls/internal/lsp/prompt.go @@ -4,6 +4,7 @@ package lsp +/* import ( "context" "fmt" @@ -315,3 +316,4 @@ func acquireLockFile(path string) (func(), bool, error) { } return release, true, nil } +*/ diff --git a/gopls/internal/lsp/prompt_test.go b/gopls/internal/lsp/prompt_test.go index d268d1f3a0c..547fd71a4af 100644 --- a/gopls/internal/lsp/prompt_test.go +++ b/gopls/internal/lsp/prompt_test.go @@ -4,6 +4,7 @@ package lsp +/* import ( "path/filepath" "sync" @@ -80,3 +81,4 @@ func TestReleaseAndAcquireFileLock(t *testing.T) { t.Fatalf("failed to Acquire") } } +*/ diff --git a/gopls/internal/lsp/source/completion/builtin_gox.go b/gopls/internal/lsp/source/completion/builtin_gox.go index 8b1026a759d..c8fbe56c88b 100644 --- a/gopls/internal/lsp/source/completion/builtin_gox.go +++ b/gopls/internal/lsp/source/completion/builtin_gox.go @@ -4,6 +4,7 @@ package completion +/* import ( "context" "go/types" @@ -146,3 +147,4 @@ func (c *gopCompleter) builtinArgType(obj types.Object, call *ast.CallExpr, pare return inf } +*/ diff --git a/gopls/internal/lsp/source/completion/completion_gox.go b/gopls/internal/lsp/source/completion/completion_gox.go index 5ad41c985fd..1a68a9bc6c7 100644 --- a/gopls/internal/lsp/source/completion/completion_gox.go +++ b/gopls/internal/lsp/source/completion/completion_gox.go @@ -4,6 +4,7 @@ package completion +/* import ( "context" "fmt" @@ -2515,3 +2516,4 @@ func gopForEachPackageMember(content []byte, f func(tok token.Token, id *ast.Ide } } } +*/ diff --git a/gopls/internal/lsp/source/completion/deep_completion_gox.go b/gopls/internal/lsp/source/completion/deep_completion_gox.go index fef72f7645f..77da8233960 100644 --- a/gopls/internal/lsp/source/completion/deep_completion_gox.go +++ b/gopls/internal/lsp/source/completion/deep_completion_gox.go @@ -4,6 +4,7 @@ package completion +/* import ( "context" "go/types" @@ -105,3 +106,4 @@ func (c *gopCompleter) objChainMatches(cand *candidate, chain []types.Object) bo return true } +*/ diff --git a/gopls/internal/lsp/source/completion/definition_gox.go b/gopls/internal/lsp/source/completion/definition_gox.go index efbd4e875fa..5e4249d65f9 100644 --- a/gopls/internal/lsp/source/completion/definition_gox.go +++ b/gopls/internal/lsp/source/completion/definition_gox.go @@ -4,6 +4,7 @@ package completion +/* import ( "go/types" "strings" @@ -97,3 +98,4 @@ func gopDefinition(path []ast.Node, obj types.Object, pgf *source.ParsedGopFile) } return ans, sel } +*/ diff --git a/gopls/internal/lsp/source/completion/format_gox.go b/gopls/internal/lsp/source/completion/format_gox.go index 5885e3d36c0..7402ac7b8c8 100644 --- a/gopls/internal/lsp/source/completion/format_gox.go +++ b/gopls/internal/lsp/source/completion/format_gox.go @@ -4,6 +4,7 @@ package completion +/* import ( "context" "fmt" @@ -337,3 +338,4 @@ func (c *gopCompleter) importEdits(imp *importInfo) ([]protocol.TextEdit, error) FixType: imports.AddImport, }) } +*/ diff --git a/gopls/internal/lsp/source/completion/fuzz_gox.go b/gopls/internal/lsp/source/completion/fuzz_gox.go index e80d8ecbfe0..103eb650c63 100644 --- a/gopls/internal/lsp/source/completion/fuzz_gox.go +++ b/gopls/internal/lsp/source/completion/fuzz_gox.go @@ -4,6 +4,7 @@ package completion +/* import ( "fmt" "go/types" @@ -134,3 +135,4 @@ Loop: // let the standard processing take care of it instead return false } +*/ diff --git a/gopls/internal/lsp/source/completion/keywords_gox.go b/gopls/internal/lsp/source/completion/keywords_gox.go index 159f2bcf452..8527b9e4ef7 100644 --- a/gopls/internal/lsp/source/completion/keywords_gox.go +++ b/gopls/internal/lsp/source/completion/keywords_gox.go @@ -4,6 +4,7 @@ package completion +/* import ( "github.com/goplus/gop/ast" "golang.org/x/tools/gopls/internal/lsp/protocol" @@ -123,3 +124,4 @@ func (c *gopCompleter) addKeywordItems(seen map[string]bool, score float64, kws } } } +*/ diff --git a/gopls/internal/lsp/source/completion/labels_gox.go b/gopls/internal/lsp/source/completion/labels_gox.go index 53221677a20..8994b14ce47 100644 --- a/gopls/internal/lsp/source/completion/labels_gox.go +++ b/gopls/internal/lsp/source/completion/labels_gox.go @@ -4,6 +4,7 @@ package completion +/* // wantLabelCompletion returns true if we want (only) label // completions at the position. func (c *gopCompleter) wantLabelCompletion() labelType { @@ -16,3 +17,4 @@ func (c *gopCompleter) wantLabelCompletion() labelType { func (c *gopCompleter) labels(lt labelType) { panic("todo") } +*/ diff --git a/gopls/internal/lsp/source/completion/literal_gox.go b/gopls/internal/lsp/source/completion/literal_gox.go index cd3b8ee4dae..5be7df1254a 100644 --- a/gopls/internal/lsp/source/completion/literal_gox.go +++ b/gopls/internal/lsp/source/completion/literal_gox.go @@ -4,6 +4,7 @@ package completion +/* import ( "context" "fmt" @@ -521,3 +522,4 @@ func (c *gopCompleter) typeParamInScope(tp *typeparams.TypeParam) bool { _, foundObj := scope.LookupParent(obj.Name(), c.pos) return obj == foundObj } +*/ diff --git a/gopls/internal/lsp/source/completion/package_gox.go b/gopls/internal/lsp/source/completion/package_gox.go index d6fec6766ad..7afde3f2ccf 100644 --- a/gopls/internal/lsp/source/completion/package_gox.go +++ b/gopls/internal/lsp/source/completion/package_gox.go @@ -4,6 +4,7 @@ package completion +/* import ( "context" "errors" @@ -33,3 +34,4 @@ func (c *gopCompleter) packageNameCompletions(ctx context.Context, fileURI span. } return nil } +*/ diff --git a/gopls/internal/lsp/source/completion/postfix_snippets_gox.go b/gopls/internal/lsp/source/completion/postfix_snippets_gox.go index 67f9a5fd1d5..112506d3676 100644 --- a/gopls/internal/lsp/source/completion/postfix_snippets_gox.go +++ b/gopls/internal/lsp/source/completion/postfix_snippets_gox.go @@ -4,6 +4,7 @@ package completion +/* import ( "context" "fmt" @@ -168,3 +169,4 @@ func (c *gopCompleter) importIfNeeded(pkgPath string, scope *types.Scope) (strin return defaultName, edits, nil } +*/ diff --git a/gopls/internal/lsp/source/completion/printf_gox.go b/gopls/internal/lsp/source/completion/printf_gox.go index d16589d958c..95be1dbf1e5 100644 --- a/gopls/internal/lsp/source/completion/printf_gox.go +++ b/gopls/internal/lsp/source/completion/printf_gox.go @@ -4,6 +4,7 @@ package completion +/* import ( "go/constant" "go/types" @@ -47,3 +48,4 @@ func gopPrintfArgKind(info *typesutil.Info, call *ast.CallExpr, argIdx int) objK return formatOperandKind(constant.StringVal(strArg), argIdx-(numParams-1)+1) } +*/ diff --git a/gopls/internal/lsp/source/completion/snippet_gox.go b/gopls/internal/lsp/source/completion/snippet_gox.go index fca00ff7cbc..5974741f294 100644 --- a/gopls/internal/lsp/source/completion/snippet_gox.go +++ b/gopls/internal/lsp/source/completion/snippet_gox.go @@ -4,6 +4,7 @@ package completion +/* import ( "github.com/goplus/gop/ast" "golang.org/x/tools/gopls/internal/lsp/safetoken" @@ -118,3 +119,4 @@ func (c *gopCompleter) functionCallSnippet(name string, tparams, params []string snip.WriteText(")") } +*/ diff --git a/gopls/internal/lsp/source/completion/statements_gox.go b/gopls/internal/lsp/source/completion/statements_gox.go index 0f2efd371df..b6d09f44cb3 100644 --- a/gopls/internal/lsp/source/completion/statements_gox.go +++ b/gopls/internal/lsp/source/completion/statements_gox.go @@ -4,6 +4,7 @@ package completion +/* import ( "fmt" "go/types" @@ -359,3 +360,4 @@ func gopGetTestVar(enclosingFunc *gopFuncInfo, pkg source.Package) string { return "" } +*/ diff --git a/gopls/internal/lsp/source/completion/util_gox.go b/gopls/internal/lsp/source/completion/util_gox.go index db3c2c74788..6ace51e896d 100644 --- a/gopls/internal/lsp/source/completion/util_gox.go +++ b/gopls/internal/lsp/source/completion/util_gox.go @@ -4,6 +4,7 @@ package completion +/* import ( "go/types" @@ -124,3 +125,4 @@ func (c *gopCompleter) editText(from, to token.Pos, newText string) ([]protocol. New: newText, }}) } +*/ diff --git a/gopls/internal/lsp/source/format_gox.go b/gopls/internal/lsp/source/format_gox.go index 29c72b97248..e547fa0fd80 100644 --- a/gopls/internal/lsp/source/format_gox.go +++ b/gopls/internal/lsp/source/format_gox.go @@ -4,6 +4,7 @@ package source +/* import ( "bytes" "context" @@ -105,3 +106,4 @@ func isClass(fh FileHandle) bool { fext := filepath.Ext(fh.URI().Filename()) return goputil.FileKind(fext) == goputil.FileGopClass } +*/ diff --git a/gopls/internal/lsp/source/highlight_gox.go b/gopls/internal/lsp/source/highlight_gox.go index d0754df0eb0..10a715abd82 100644 --- a/gopls/internal/lsp/source/highlight_gox.go +++ b/gopls/internal/lsp/source/highlight_gox.go @@ -4,6 +4,7 @@ package source +/* import ( "go/types" @@ -23,3 +24,4 @@ func GopImportedPkgName(info *typesutil.Info, imp *ast.ImportSpec) (*types.PkgNa pkgname, ok := obj.(*types.PkgName) return pkgname, ok } +*/ diff --git a/gopls/internal/lsp/source/hover_gox.go b/gopls/internal/lsp/source/hover_gox.go index 619b8314be3..a886deaef1f 100644 --- a/gopls/internal/lsp/source/hover_gox.go +++ b/gopls/internal/lsp/source/hover_gox.go @@ -4,6 +4,7 @@ package source +/* import ( "context" "fmt" @@ -119,3 +120,4 @@ func hoverGopImport(ctx context.Context, snapshot Snapshot, pkg Package, pgf *Pa FullDocumentation: docText, }, nil } +*/ diff --git a/gopls/internal/lsp/source/inline.go b/gopls/internal/lsp/source/inline.go index 4e6e16f9159..7f24ced016a 100644 --- a/gopls/internal/lsp/source/inline.go +++ b/gopls/internal/lsp/source/inline.go @@ -5,7 +5,7 @@ package source // This file defines the refactor.inline code action. - +/* import ( "context" "fmt" @@ -136,3 +136,4 @@ func inlineCall(ctx context.Context, snapshot Snapshot, fh FileHandle, rng proto TextEdits: diffToTextEdits(callerPGF.Tok, diff.Bytes(callerPGF.Src, got)), }, nil } +*/ diff --git a/gopls/internal/lsp/source/util_gox.go b/gopls/internal/lsp/source/util_gox.go index e0845f37ff7..58f2d4cd957 100644 --- a/gopls/internal/lsp/source/util_gox.go +++ b/gopls/internal/lsp/source/util_gox.go @@ -4,6 +4,7 @@ package source +/* import ( "go/types" "strconv" @@ -168,3 +169,4 @@ func UnquoteGopImportPath(s *ast.ImportSpec) ImportPath { } return ImportPath(path) } +*/ diff --git a/gopls/internal/lsp/source/view_gox.go b/gopls/internal/lsp/source/view_gox.go index 6554db639fa..c5c56a43f88 100644 --- a/gopls/internal/lsp/source/view_gox.go +++ b/gopls/internal/lsp/source/view_gox.go @@ -4,6 +4,7 @@ package source +/* import ( "context" "fmt" @@ -99,3 +100,4 @@ func NarrowestPackageForGopFile(ctx context.Context, snapshot Snapshot, uri span } return pkg, pgf, err } +*/ diff --git a/gopls/internal/regtest/misc/prompt_test.go b/gopls/internal/regtest/misc/prompt_test.go index 7a262ad934e..5163885faeb 100644 --- a/gopls/internal/regtest/misc/prompt_test.go +++ b/gopls/internal/regtest/misc/prompt_test.go @@ -4,6 +4,7 @@ package misc +/* import ( "fmt" "os" @@ -229,3 +230,4 @@ func main() { ) }) } +*/ diff --git a/gopls/internal/telemetry/latency.go b/gopls/internal/telemetry/latency.go index b0e2da73165..6c3fe09be21 100644 --- a/gopls/internal/telemetry/latency.go +++ b/gopls/internal/telemetry/latency.go @@ -4,6 +4,7 @@ package telemetry +/* import ( "context" "errors" @@ -100,3 +101,4 @@ func StartLatencyTimer(operation string) func(context.Context, error) { } } } +*/ diff --git a/gopls/internal/telemetry/telemetry.go b/gopls/internal/telemetry/telemetry.go index dc6f7c23372..fdadd3710d3 100644 --- a/gopls/internal/telemetry/telemetry.go +++ b/gopls/internal/telemetry/telemetry.go @@ -7,6 +7,7 @@ package telemetry +/* import ( "fmt" @@ -91,3 +92,4 @@ func AddForwardedCounters(names []string, values []int64) { counter.Add("fwd/"+n, v) } } +*/ diff --git a/gopls/internal/telemetry/telemetry_go118.go b/gopls/internal/telemetry/telemetry_go118.go index 53394002f76..565f4b20090 100644 --- a/gopls/internal/telemetry/telemetry_go118.go +++ b/gopls/internal/telemetry/telemetry_go118.go @@ -7,6 +7,7 @@ package telemetry +/* import "golang.org/x/tools/gopls/internal/lsp/protocol" func Mode() string { @@ -28,3 +29,4 @@ func RecordViewGoVersion(x int) { func AddForwardedCounters(names []string, values []int64) { } +*/ diff --git a/gopls/internal/telemetry/telemetry_test.go b/gopls/internal/telemetry/telemetry_test.go index 25e94f6284f..76013655a7a 100644 --- a/gopls/internal/telemetry/telemetry_test.go +++ b/gopls/internal/telemetry/telemetry_test.go @@ -7,6 +7,7 @@ package telemetry_test +/* import ( "context" "errors" @@ -213,3 +214,4 @@ func _() { } }) } +*/ diff --git a/gopls/internal/vulncheck/scan/command.go b/gopls/internal/vulncheck/scan/command.go index b240e39a94b..aa3a3e3de3a 100644 --- a/gopls/internal/vulncheck/scan/command.go +++ b/gopls/internal/vulncheck/scan/command.go @@ -7,6 +7,7 @@ package scan +/* import ( "bytes" "context" @@ -474,3 +475,4 @@ func (h *osvReader) Finding(finding *govulncheck.Finding) error { func (h *osvReader) Progress(progress *govulncheck.Progress) error { return nil } +*/ diff --git a/internal/fuzzy/self_test.go b/internal/fuzzy/self_test.go index fae0aeae249..560b5275032 100644 --- a/internal/fuzzy/self_test.go +++ b/internal/fuzzy/self_test.go @@ -4,6 +4,7 @@ package fuzzy_test +/* import ( "testing" @@ -37,3 +38,4 @@ func BenchmarkSelf_SymbolMatcher(b *testing.B) { } } } +*/ diff --git a/internal/persistent/set.go b/internal/persistent/set.go index 348de5a71d2..c21d0fae617 100644 --- a/internal/persistent/set.go +++ b/internal/persistent/set.go @@ -4,6 +4,7 @@ package persistent +/* import "golang.org/x/tools/internal/constraints" // Set is a collection of elements of type K. @@ -76,3 +77,4 @@ func (s *Set[K]) Remove(key K) { s.impl.Delete(key) } } +*/ diff --git a/internal/persistent/set_test.go b/internal/persistent/set_test.go index 59025140bce..49bd70a0f2e 100644 --- a/internal/persistent/set_test.go +++ b/internal/persistent/set_test.go @@ -4,6 +4,7 @@ package persistent_test +/* import ( "fmt" "strings" @@ -130,3 +131,4 @@ func diff[K constraints.Ordered](got *persistent.Set[K], want []K) string { } return "" } +*/ diff --git a/internal/typesinternal/objectpath.go b/internal/typesinternal/objectpath.go index 5e96e895573..16e4f64e3d7 100644 --- a/internal/typesinternal/objectpath.go +++ b/internal/typesinternal/objectpath.go @@ -4,6 +4,7 @@ package typesinternal +/* import "go/types" // This file contains back doors that allow gopls to avoid method sorting when @@ -22,3 +23,4 @@ var SkipEncoderMethodSorting func(enc interface{}) // ObjectpathObject is like objectpath.Object, but allows suppressing method // sorting. var ObjectpathObject func(pkg *types.Package, p string, skipMethodSorting bool) (types.Object, error) +*/