all: update install commands to go install pkg@version

Updates golang/go#43684
Updates golang/go#49101

Change-Id: I2f0c7920bcd6ce0429f1b7bdda3747bf376775f2
Reviewed-on: https://go-review.googlesource.com/c/tools/+/357714
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Trust: Rebecca Stambler <rstambler@golang.org>
Trust: Peter Weinberger <pjw@google.com>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
This commit is contained in:
Sean Liao 2021-10-21 19:21:29 +02:00 committed by Rebecca Stambler
parent 591e12a7fb
commit e1e2965795
3 changed files with 5 additions and 6 deletions

View File

@ -9,15 +9,14 @@ 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`.
`go install`.
Packages include a type-checker for Go and an implementation of the
Static Single Assignment form (SSA) representation for Go programs.
## Download/Install
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`.
The easiest way to install is to run `go install golang.org/x/tools/...@latest`.
## JS/CSS Formatting

View File

@ -9,7 +9,7 @@ To get a specific version of `gopls` (for example, to test a prerelease
version), run:
```sh
GO111MODULE=on go get golang.org/x/tools/gopls@vX.Y.Z
GO111MODULE=on go install golang.org/x/tools/gopls@vX.Y.Z
```
Where `vX.Y.Z` is the desired version.
@ -56,7 +56,7 @@ out the `master` branch in the Go repository, or by using
`golang.org/dl/gotip`:
```
$ go get golang.org/dl/gotip
$ go install golang.org/dl/gotip@latest
$ gotip download
```

View File

@ -103,7 +103,7 @@ func (s *Server) initialize(ctx context.Context, params *protocol.ParamInitializ
if dep.Path == "github.com/sergi/go-diff" && dep.Version == "v1.2.0" {
if err := s.eventuallyShowMessage(ctx, &protocol.ShowMessageParams{
Message: `It looks like you have a bad gopls installation.
Please reinstall gopls by running 'GO111MODULE=on go get golang.org/x/tools/gopls@latest'.
Please reinstall gopls by running 'GO111MODULE=on go install golang.org/x/tools/gopls@latest'.
See https://github.com/golang/go/issues/45732 for more information.`,
Type: protocol.Error,
}); err != nil {