gopls/doc: include instructions for compiling generic code

Change-Id: Ia7855890c72f9e376816a7c2d71f9715c7f2eb9f
Reviewed-on: https://go-review.googlesource.com/c/tools/+/330369
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
This commit is contained in:
Rob Findley 2021-06-23 10:12:25 -04:00 committed by Robert Findley
parent 6d3e439322
commit d824a7481d
1 changed files with 8 additions and 0 deletions

View File

@ -62,4 +62,12 @@ this increases your chances of a build failure).
$ GO111MODULE=on gotip get -tags=typeparams golang.org/x/tools/gopls@master golang.org/x/tools@master
```
This will build a version of gopls that understands generic code. To actually
run the generic code you develop, you must also tell the compiler to speak
generics using the `-G=3` compiler flag. For example
```
$ gotip run -gcflags=-G=3 .
```
[Go project]: https://go.googlesource.com/go