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>
// 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
// }
//
// 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.
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
}
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.