Skip to content

Commit d3f5cf9

Browse files
cmd/go: update go work edit -json types to final version
For #45713 Change-Id: Ia55a96702b99cccaf5d96c2125ee513700658444 Reviewed-on: https://go-review.googlesource.com/c/go/+/381874 Trust: Ian Lance Taylor <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Michael Matloob <[email protected]> Trust: Michael Matloob <[email protected]>
1 parent 822dbcb commit d3f5cf9

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

src/cmd/go/alldocs.go

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/cmd/go/internal/workcmd/edit.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,19 +63,14 @@ writing it back to go.mod.
6363
The -json flag prints the final go.work file in JSON format instead of
6464
writing it back to go.mod. The JSON output corresponds to these Go types:
6565
66-
type Module struct {
67-
Path string
68-
Version string
69-
}
70-
7166
type GoWork struct {
72-
Go string
73-
Directory []Directory
74-
Replace []Replace
67+
Go string
68+
Use []Use
69+
Replace []Replace
7570
}
7671
7772
type Use struct {
78-
Path string
73+
DiskPath string
7974
ModulePath string
8075
}
8176
@@ -84,6 +79,11 @@ writing it back to go.mod. The JSON output corresponds to these Go types:
8479
New Module
8580
}
8681
82+
type Module struct {
83+
Path string
84+
Version string
85+
}
86+
8787
See the workspaces design proposal at
8888
https://go.googlesource.com/proposal/+/master/design/45713-workspace.md for
8989
more information.

0 commit comments

Comments
 (0)