Skip to content

Commit b22bc85

Browse files
committed
gopls/doc: update stale documentation on generics
Change-Id: I01b7bad40e466ef04450aae84d51b5cf47fa4a0e Reviewed-on: https://go-review.googlesource.com/c/tools/+/396435 Trust: Robert Findley <[email protected]> Run-TryBot: Robert Findley <[email protected]> gopls-CI: kokoro <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Hyang-Ah Hana Kim <[email protected]>
1 parent e693fb4 commit b22bc85

File tree

1 file changed

+11
-27
lines changed

1 file changed

+11
-27
lines changed

gopls/doc/advanced.md

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -44,42 +44,26 @@ editor.
4444

4545
## Working with generic code
4646

47-
Gopls has beta support for editing generic Go code, as defined by the type
48-
parameters proposal ([golang/go#43651](https://golang.org/issues/43651)) and
49-
type set addendum ([golang/go#45346](https://golang.org/issues/45346)).
50-
51-
To enable this support, you need to **build gopls with a version of Go that
52-
supports generics**. The easiest way to do this is by installing the Go 1.18 Beta
53-
as described at
54-
[Tutorial: Getting started with generics#prerequisites](https://go.dev/doc/tutorial/generics),
55-
and then using this Go version to build gopls:
47+
Gopls has support for editing generic Go code. To enable this support, you need
48+
to **install gopls using Go 1.18 or later**. The easiest way to do this is by
49+
[installing Go 1.18+](https://go.dev/dl) and then using this Go version to
50+
install gopls:
5651

5752
```
58-
$ go1.18beta2 install golang.org/x/tools/gopls@latest
53+
$ go install golang.org/x/tools/gopls@latest
5954
```
6055

61-
When using the Go 1.18, it is strongly recommended that you install the latest
62-
version of `gopls`, or the latest **unstable** version as
63-
[described above](#installing-unreleased-versions).
64-
65-
You also need to make `gopls` select the beta version of `go` (in `<GOROOT>/go/bin`
66-
where GOROOT is the location reported by `go1.18beta2 env GOROOT`) by adding
67-
it to your `PATH` or by configuring your editor.
68-
69-
The `gopls` built with these instructions understands generic code. To actually
70-
run the generic code you develop, you must also use the beta version of the Go
71-
compiler. For example:
56+
It is strongly recommended that you install the latest version of `gopls`, or
57+
the latest **unstable** version as [described above](#installing-unreleased-versions).
58+
We're still working on improving our generics support.
7259

73-
```
74-
$ go1.18beta2 run .
75-
```
60+
The `gopls` built with these instructions understands generic code. See the
61+
[generics tutorial](https://go.dev/doc/tutorial/generics) for more information
62+
on how to use generics in Go!
7663

7764
### Known issues
7865

7966
* [`staticcheck`](https://github.com/golang/tools/blob/master/gopls/doc/settings.md#staticcheck-bool)
8067
on generic code is not supported yet.
8168

82-
please follow the [v0.8.0](https://github.com/golang/go/milestone/244) milestone
83-
to see the list of go1.18-related known issues and our progress.
84-
8569
[Go project]: https://go.googlesource.com/go

0 commit comments

Comments
 (0)