mirror of
https://github.com/golang/go.git
synced 2025-05-31 04:02:58 +00:00
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 <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Matloob <matloob@golang.org> Trust: Michael Matloob <matloob@golang.org>
This commit is contained in:
parent
822dbcb7d4
commit
d3f5cf9d28
@ -1472,19 +1472,14 @@
|
||||
// The -json flag prints the final go.work file in JSON format instead of
|
||||
// writing it back to go.mod. The JSON output corresponds to these Go types:
|
||||
//
|
||||
// type Module struct {
|
||||
// Path string
|
||||
// Version string
|
||||
// }
|
||||
//
|
||||
// type GoWork struct {
|
||||
// Go string
|
||||
// Directory []Directory
|
||||
// Replace []Replace
|
||||
// Go string
|
||||
// Use []Use
|
||||
// Replace []Replace
|
||||
// }
|
||||
//
|
||||
// type Use struct {
|
||||
// Path string
|
||||
// DiskPath string
|
||||
// ModulePath string
|
||||
// }
|
||||
//
|
||||
@ -1493,6 +1488,11 @@
|
||||
// New Module
|
||||
// }
|
||||
//
|
||||
// type Module struct {
|
||||
// Path string
|
||||
// Version string
|
||||
// }
|
||||
//
|
||||
// See the workspaces design proposal at
|
||||
// https://go.googlesource.com/proposal/+/master/design/45713-workspace.md for
|
||||
// more information.
|
||||
|
@ -63,19 +63,14 @@ writing it back to go.mod.
|
||||
The -json flag prints the final go.work file in JSON format instead of
|
||||
writing it back to go.mod. The JSON output corresponds to these Go types:
|
||||
|
||||
type Module struct {
|
||||
Path string
|
||||
Version string
|
||||
}
|
||||
|
||||
type GoWork struct {
|
||||
Go string
|
||||
Directory []Directory
|
||||
Replace []Replace
|
||||
Go string
|
||||
Use []Use
|
||||
Replace []Replace
|
||||
}
|
||||
|
||||
type Use struct {
|
||||
Path string
|
||||
DiskPath string
|
||||
ModulePath string
|
||||
}
|
||||
|
||||
@ -84,6 +79,11 @@ writing it back to go.mod. The JSON output corresponds to these Go types:
|
||||
New Module
|
||||
}
|
||||
|
||||
type Module struct {
|
||||
Path string
|
||||
Version string
|
||||
}
|
||||
|
||||
See the workspaces design proposal at
|
||||
https://go.googlesource.com/proposal/+/master/design/45713-workspace.md for
|
||||
more information.
|
||||
|
Loading…
x
Reference in New Issue
Block a user