@@ -44,42 +44,26 @@ editor.
44
44
45
45
## Working with generic code
46
46
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:
56
51
57
52
```
58
- $ go1.18beta2 install golang.org/x/tools/gopls@latest
53
+ $ go install golang.org/x/tools/gopls@latest
59
54
```
60
55
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.
72
59
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!
76
63
77
64
### Known issues
78
65
79
66
* [ ` staticcheck ` ] ( https://github.com/golang/tools/blob/master/gopls/doc/settings.md#staticcheck-bool )
80
67
on generic code is not supported yet.
81
68
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
-
85
69
[ Go project ] : https://go.googlesource.com/go
0 commit comments