File tree 1 file changed +12
-1
lines changed
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,18 @@ You can achieve this by adding the right version of `go` to your `PATH`
42
42
(` export PATH=$HOME/go/bin:$PATH ` on Unix systems) or by configuring your
43
43
editor.
44
44
45
+ To work on both ` std ` and ` cmd ` simultaneously, add a ` go.work ` file to
46
+ ` GOROOT/src ` :
47
+
48
+ ```
49
+ cd $(go env GOROOT)/src
50
+ go work init . cmd
51
+ ```
52
+
53
+ Note that you must work inside the ` GOROOT/src ` subdirectory, as the ` go `
54
+ command does not recognize ` go.work ` files in a parent of ` GOROOT/src `
55
+ (https://go.dev/issue/59429 ).
56
+
45
57
## Working with generic code
46
58
47
59
Gopls has support for editing generic Go code. To enable this support, you need
@@ -55,7 +67,6 @@ $ go install golang.org/x/tools/gopls@latest
55
67
56
68
It is strongly recommended that you install the latest version of ` gopls ` , or
57
69
the latest ** unstable** version as [ described above] ( #installing-unreleased-versions ) .
58
- We're still working on improving our generics support.
59
70
60
71
The ` gopls ` built with these instructions understands generic code. See the
61
72
[ generics tutorial] ( https://go.dev/doc/tutorial/generics ) for more information
You can’t perform that action at this time.
0 commit comments