Skip to content

Commit d824a74

Browse files
committed
gopls/doc: include instructions for compiling generic code
Change-Id: Ia7855890c72f9e376816a7c2d71f9715c7f2eb9f Reviewed-on: https://go-review.googlesource.com/c/tools/+/330369 Trust: Robert Findley <[email protected]> Run-TryBot: Robert Findley <[email protected]> Reviewed-by: Hyang-Ah Hana Kim <[email protected]> gopls-CI: kokoro <[email protected]> TryBot-Result: Go Bot <[email protected]>
1 parent 6d3e439 commit d824a74

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

gopls/doc/advanced.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,12 @@ this increases your chances of a build failure).
6262
$ GO111MODULE=on gotip get -tags=typeparams golang.org/x/tools/gopls@master golang.org/x/tools@master
6363
```
6464

65+
This will build a version of gopls that understands generic code. To actually
66+
run the generic code you develop, you must also tell the compiler to speak
67+
generics using the `-G=3` compiler flag. For example
68+
69+
```
70+
$ gotip run -gcflags=-G=3 .
71+
```
72+
6573
[Go project]: https://go.googlesource.com/go

0 commit comments

Comments
 (0)