mirror of
https://github.com/golang/go.git
synced 2025-10-19 11:03:18 +00:00
cmd/go: update go help mod edit
with the tool and ignore sections
The types were added to the docs, but not the fields in GoMod. While here, I was initially confused about what is the top-level type given that `type Module` comes first. Move `type GoMod` to the top as it is the actual top-level type. Change-Id: I1270154837501f5c7f5b21959b2841fd4ac808d0 Reviewed-on: https://go-review.googlesource.com/c/go/+/700116 Reviewed-by: Sean Liao <sean@liao.dev> Reviewed-by: Carlos Amedee <carlos@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Matloob <matloob@golang.org> Reviewed-by: Junyang Shao <shaojunyang@google.com>
This commit is contained in:
parent
8c68a1c1ab
commit
707454b41f
2 changed files with 14 additions and 10 deletions
|
@ -1280,11 +1280,6 @@
|
||||||
// The -json flag prints the final go.mod file in JSON format instead of
|
// The -json flag prints the final go.mod file in JSON format instead of
|
||||||
// writing it back to go.mod. The JSON output corresponds to these Go types:
|
// writing it back to go.mod. The JSON output corresponds to these Go types:
|
||||||
//
|
//
|
||||||
// type Module struct {
|
|
||||||
// Path string
|
|
||||||
// Version string
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// type GoMod struct {
|
// type GoMod struct {
|
||||||
// Module ModPath
|
// Module ModPath
|
||||||
// Go string
|
// Go string
|
||||||
|
@ -1294,6 +1289,13 @@
|
||||||
// Exclude []Module
|
// Exclude []Module
|
||||||
// Replace []Replace
|
// Replace []Replace
|
||||||
// Retract []Retract
|
// Retract []Retract
|
||||||
|
// Tool []Tool
|
||||||
|
// Ignore []Ignore
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// type Module struct {
|
||||||
|
// Path string
|
||||||
|
// Version string
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// type ModPath struct {
|
// type ModPath struct {
|
||||||
|
|
|
@ -104,11 +104,6 @@ writing it back to go.mod.
|
||||||
The -json flag prints the final go.mod file in JSON format instead of
|
The -json flag prints the final go.mod file in JSON format instead of
|
||||||
writing it back to go.mod. The JSON output corresponds to these Go types:
|
writing it back to go.mod. The JSON output corresponds to these Go types:
|
||||||
|
|
||||||
type Module struct {
|
|
||||||
Path string
|
|
||||||
Version string
|
|
||||||
}
|
|
||||||
|
|
||||||
type GoMod struct {
|
type GoMod struct {
|
||||||
Module ModPath
|
Module ModPath
|
||||||
Go string
|
Go string
|
||||||
|
@ -118,6 +113,13 @@ writing it back to go.mod. The JSON output corresponds to these Go types:
|
||||||
Exclude []Module
|
Exclude []Module
|
||||||
Replace []Replace
|
Replace []Replace
|
||||||
Retract []Retract
|
Retract []Retract
|
||||||
|
Tool []Tool
|
||||||
|
Ignore []Ignore
|
||||||
|
}
|
||||||
|
|
||||||
|
type Module struct {
|
||||||
|
Path string
|
||||||
|
Version string
|
||||||
}
|
}
|
||||||
|
|
||||||
type ModPath struct {
|
type ModPath struct {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue