Skip to content

Commit 2d517d5

Browse files
committed
gopls/internal/golang: fix build breakage due to semantic conflict
Unbreak the x/tools build dashboard due to a semantic conflict between CL 572475 and CL 571215. Change-Id: I8ce1308ee99e75aa7cf8f7bd1d8b1dedcb845f4d Reviewed-on: https://go-review.googlesource.com/c/tools/+/572515 Auto-Submit: Alan Donovan <[email protected]> Reviewed-by: Alan Donovan <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent 6af0295 commit 2d517d5

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

gopls/internal/golang/pkgdoc.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,14 @@ func RenderPackageDoc(pkg *cache.Package, posURL func(filename string, line, col
6161
// The only loss is doc.classifyExamples.
6262
// TODO(adonovan): simulate that too.
6363
fileMap := make(map[string]*ast.File)
64-
for _, f := range pkg.GetSyntax() {
64+
for _, f := range pkg.Syntax() {
6565
fileMap[pkg.FileSet().File(f.Pos()).Name()] = f
6666
}
6767
astpkg := &ast.Package{
68-
Name: pkg.GetTypes().Name(),
68+
Name: pkg.Types().Name(),
6969
Files: fileMap,
7070
}
71-
docpkg := doc.New(astpkg, pkg.GetTypes().Path(), doc.PreserveAST)
71+
docpkg := doc.New(astpkg, pkg.Types().Path(), doc.PreserveAST)
7272

7373
// Ensure doc links (e.g. "[fmt.Println]") become valid links.
7474
docpkg.Printer().DocLinkURL = func(link *comment.DocLink) string {
@@ -127,7 +127,7 @@ function httpGET(url) {
127127

128128
// linkify returns the appropriate URL (if any) for an identifier.
129129
linkify := func(id *ast.Ident) protocol.URI {
130-
if obj, ok := pkg.GetTypesInfo().Uses[id]; ok && obj.Pkg() != nil {
130+
if obj, ok := pkg.TypesInfo().Uses[id]; ok && obj.Pkg() != nil {
131131
// imported package name?
132132
if pkgname, ok := obj.(*types.PkgName); ok {
133133
// TODO(adonovan): do this for Defs of PkgName too.
@@ -136,7 +136,7 @@ function httpGET(url) {
136136

137137
// package-level symbol?
138138
if obj.Parent() == obj.Pkg().Scope() {
139-
if obj.Pkg() == pkg.GetTypes() {
139+
if obj.Pkg() == pkg.Types() {
140140
return "#" + obj.Name() // intra-package ref
141141
} else {
142142
return pkgURL(PackagePath(obj.Pkg().Path()), obj.Name())
@@ -224,21 +224,21 @@ function httpGET(url) {
224224

225225
// pkgRelative qualifies types by package name alone
226226
pkgRelative := func(other *types.Package) string {
227-
if pkg.GetTypes() == other {
227+
if pkg.Types() == other {
228228
return "" // same package; unqualified
229229
}
230230
return other.Name()
231231
}
232232

233233
// package name
234-
fmt.Fprintf(&buf, "<h1>Package %s</h1>\n", pkg.GetTypes().Name())
234+
fmt.Fprintf(&buf, "<h1>Package %s</h1>\n", pkg.Types().Name())
235235

236236
// import path
237-
fmt.Fprintf(&buf, "<pre class='code'>import %q</pre>\n", pkg.GetTypes().Path())
237+
fmt.Fprintf(&buf, "<pre class='code'>import %q</pre>\n", pkg.Types().Path())
238238

239239
// link to same package in pkg.go.dev
240240
fmt.Fprintf(&buf, "<div><a href=%q title='View in pkg.go.dev'><img id='pkgsite' src='/assets/go-logo-blue.svg'/></a>\n",
241-
"https://pkg.go.dev/"+string(pkg.GetTypes().Path()))
241+
"https://pkg.go.dev/"+string(pkg.Types().Path()))
242242

243243
// package doc
244244
fmt.Fprintf(&buf, "<div class='comment'>%s</div>\n", docpkg.HTML(docpkg.Doc))
@@ -252,7 +252,7 @@ function httpGET(url) {
252252
if len(docpkg.Vars) > 0 {
253253
fmt.Fprintf(&buf, "<li><a href='#hdr-Variables'>Variables</a></li>\n")
254254
}
255-
scope := pkg.GetTypes().Scope()
255+
scope := pkg.Types().Scope()
256256
for _, fn := range docpkg.Funcs {
257257
obj := scope.Lookup(fn.Name).(*types.Func)
258258
fmt.Fprintf(&buf, "<li><a href='#%s'>%s</a></li>\n",

0 commit comments

Comments
 (0)