commit | e64a37c1d51946a16e95e98ff87b7b77555bd9d7 | [log] [tgz] |
---|---|---|
author | Muir Manders <muir@mnd.rs> | Wed May 12 10:21:52 2021 -0700 |
committer | Rebecca Stambler <rstambler@golang.org> | Mon May 24 16:41:39 2021 +0000 |
tree | aeea28b118c913cb558245cdf7b2a51b03bad19d | |
parent | 4061312594fc4c553ddda40109133239c66553b2 [diff] |
lsp/completion: don't offer literal candidates requiring conversion For example: type foo struct { i int } type bar struct { i int } var _ foo = <> Previously at <> we would offer "bar{}" in addition to "foo{}" because we knew "bar" was convertible to "foo". The "bar{}" completion wasn't valid as inserted, however, because we didn't include the type conversion. Anyway, it doesn't make sense to include convertible types since the directly matching type should also be available. Fix by tweaking the literal candidate code to skip candidates requiring conversion. Fixes golang/go#46113. Change-Id: Ica5e4af7f2f8bb2f7e2361efe39694f8bb738c97 Reviewed-on: https://go-review.googlesource.com/c/tools/+/319509 Run-TryBot: Muir Manders <muir@mnd.rs> Run-TryBot: Rebecca Stambler <rstambler@golang.org> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org> Trust: Rebecca Stambler <rstambler@golang.org> Trust: Michael Knyszek <mknyszek@google.com>
This subrepository holds the source for various packages and tools that support the Go programming language.
Some of the tools, godoc
and vet
for example, are included in binary Go distributions.
Others, including the Go guru
and the test coverage tool, can be fetched with go get
.
Packages include a type-checker for Go and an implementation of the Static Single Assignment form (SSA) representation for Go programs.
The easiest way to install is to run go get -u golang.org/x/tools/...
. You can also manually git clone the repository to $GOPATH/src/golang.org/x/tools
.
This repository uses prettier to format JS and CSS files.
The version of prettier
used is 1.18.2.
It is encouraged that all JS and CSS code be run through this before submitting a change. However, it is not a strict requirement enforced by CI.
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html.
The main issue tracker for the tools repository is located at https://github.com/golang/go/issues. Prefix your issue with “x/tools/(your subdir):” in the subject line, so it is easy to find.