mirror of https://github.com/golang/go.git
gopls/doc/advanced.md: correct commands for unstable version build
`go get golang.org/x/tools/gopls@master ...` resulted in warning messages like:
go get: installing executables with 'go get' in module mode is deprecated.
To adjust and download dependencies of the current module, use 'go get -d'.
To install using requirements of the current module, use 'go install'.
To install ignoring the current module, use 'go install' with a version,
like 'go install example.com/cmd@latest'.
For more information, see https://golang.org/doc/go-get-install-deprecation
or run 'go help get' or 'go help install'.
Change-Id: I1299983604c27e333f02af875826b5dd4d170068
Reviewed-on: https://go-review.googlesource.com/c/tools/+/388074
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Robert Findley <rfindley@google.com>
This commit is contained in:
parent
acdddf6756
commit
0e44f7a8a7
|
|
@ -16,7 +16,8 @@ Where `vX.Y.Z` is the desired version.
|
|||
|
||||
### Unstable versions
|
||||
|
||||
To update `gopls` to the latest **unstable** version, use:
|
||||
To update `gopls` to the latest **unstable** version, use the following
|
||||
commands.
|
||||
|
||||
```sh
|
||||
# Create an empty go.mod file, only for tracking requirements.
|
||||
|
|
@ -24,11 +25,8 @@ cd $(mktemp -d)
|
|||
go mod init gopls-unstable
|
||||
|
||||
# Use 'go get' to add requirements and to ensure they work together.
|
||||
go get golang.org/x/tools/gopls@master golang.org/x/tools@master
|
||||
go get -d golang.org/x/tools/gopls@master golang.org/x/tools@master
|
||||
|
||||
# For go1.17 or older, the above `go get` command will build and
|
||||
# install `gopls`. For go1.18+ or tip, run the following command to install
|
||||
# using selected versions in go.mod.
|
||||
go install golang.org/x/tools/gopls
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue