mirror of https://github.com/golang/go.git
This change adds support for full documentation of builtin types in the hover info, consisting of the type declaration, a link to pkg.go.dev, and the text of the doc comments in the `builtin` pseudo-package. Full documentation for builtin functions was already supported. Removes the special case for the `error` interface, which is not needed and didn't provide the full documentation anyway, only the type declaration. The code has to determine the parent ast.GenDecl (which holds the doc comments) for the ast.TypeSpec of a builtin type. Fixes golang/go#50196 Change-Id: I51a054cd7e864300ba2e51152311744b7bcf3e0c Reviewed-on: https://go-review.googlesource.com/c/tools/+/383614 Trust: Robert Findley <rfindley@google.com> Run-TryBot: Robert Findley <rfindley@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Robert Findley <rfindley@google.com> Trust: Hyang-Ah Hana Kim <hyangah@gmail.com> |
||
|---|---|---|
| .. | ||
| a.go | ||
| a.go.golden | ||
| a_test.go | ||
| a_test.go.golden | ||
| a_x_test.go | ||
| a_x_test.go.golden | ||
| d.go | ||
| d.go.golden | ||
| f.go | ||
| f.go.golden | ||
| g.go | ||
| g.go.golden | ||
| h.go | ||
| h.go.golden | ||
| random.go | ||
| random.go.golden | ||