mirror of https://github.com/golang/go.git
gopls/doc: address additional comments on workspace.md
This CL addresses an additional comment from CL 388994, changing the example to move the go.work file outside of the repo. For golang/go#51206 Change-Id: I576615f9bbcc676f3f78a959ad509b9dbab3b00e Reviewed-on: https://go-review.googlesource.com/c/tools/+/389234 Trust: Robert Findley <rfindley@google.com> Run-TryBot: Robert Findley <rfindley@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> Reviewed-by: Michael Matloob <matloob@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
parent
abbbcaf758
commit
afc5fce285
|
|
@ -32,15 +32,17 @@ The easiest way to work on multiple modules in Go 1.18 and later is therefore
|
|||
to create a `go.work` file containing the modules you wish to work on, and set
|
||||
your workspace root to the directory containing the `go.work` file.
|
||||
|
||||
For example, to work on both modules in this repo (`golang.org/x/tools` and
|
||||
`golang.org/x/tools/gopls`), the following suffices:
|
||||
For example, suppose this repo is checked out into the `$WORK/tools` directory.
|
||||
We can work on both `golang.org/x/tools` and `golang.org/x/tools/gopls`
|
||||
simultaneously by creating a `go.work` file:
|
||||
|
||||
```
|
||||
cd $WORK
|
||||
go work init
|
||||
go work use . gopls
|
||||
go work use tools tools/gopls
|
||||
```
|
||||
|
||||
...followed by opening up the repo root.
|
||||
...followed by opening the `$WORK` directory in our editor.
|
||||
|
||||
#### Experimental workspace module (Go 1.17 and earlier)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue