From e1e2965795e4255f51639d9a5418448a603b8913 Mon Sep 17 00:00:00 2001 From: Sean Liao Date: Thu, 21 Oct 2021 19:21:29 +0200 Subject: [PATCH] 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 Trust: Rebecca Stambler Trust: Peter Weinberger Run-TryBot: Rebecca Stambler gopls-CI: kokoro TryBot-Result: Go Bot --- README.md | 5 ++--- gopls/doc/advanced.md | 4 ++-- internal/lsp/general.go | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 789747b194..71a945aaf9 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/gopls/doc/advanced.md b/gopls/doc/advanced.md index 1891f1fead..d8e47f7f90 100644 --- a/gopls/doc/advanced.md +++ b/gopls/doc/advanced.md @@ -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 ``` diff --git a/internal/lsp/general.go b/internal/lsp/general.go index 44715f07e7..a946c80d2b 100644 --- a/internal/lsp/general.go +++ b/internal/lsp/general.go @@ -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 {