Skip to content

Commit 707454b

Browse files
committed
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 <[email protected]> Reviewed-by: Carlos Amedee <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Michael Matloob <[email protected]> Reviewed-by: Junyang Shao <[email protected]>
1 parent 8c68a1c commit 707454b

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

src/cmd/go/alldocs.go

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

src/cmd/go/internal/modcmd/edit.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,6 @@ writing it back to go.mod.
104104
The -json flag prints the final go.mod file in JSON format instead of
105105
writing it back to go.mod. The JSON output corresponds to these Go types:
106106
107-
type Module struct {
108-
Path string
109-
Version string
110-
}
111-
112107
type GoMod struct {
113108
Module ModPath
114109
Go string
@@ -118,6 +113,13 @@ writing it back to go.mod. The JSON output corresponds to these Go types:
118113
Exclude []Module
119114
Replace []Replace
120115
Retract []Retract
116+
Tool []Tool
117+
Ignore []Ignore
118+
}
119+
120+
type Module struct {
121+
Path string
122+
Version string
121123
}
122124
123125
type ModPath struct {

0 commit comments

Comments
 (0)