aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/alldocs.go
diff options
context:
space:
mode:
authorJay Conrod <jayconrod@google.com>2021-04-12 14:50:57 -0400
committerJay Conrod <jayconrod@google.com>2021-04-13 13:51:17 +0000
commitd948b8633d4ae3d4501d0a5382b24431a96c0cba (patch)
tree1f5aca3c1f2ed8a65a8a6be54d6f714980b6f8b0 /src/cmd/go/alldocs.go
parent49e933fc57c2f858e19c26f4a2e56ba94fc54989 (diff)
downloadgo-d948b8633d4ae3d4501d0a5382b24431a96c0cba.tar.gz
go-d948b8633d4ae3d4501d0a5382b24431a96c0cba.zip
cmd/go: fix 'go help mod edit' JSON documentation
The object representing a module directive may have a "Deprecated" field but not a "Version" field. Other objects representing module versions have "Path" and "Version" fields but not "Deprecated". For #40357 Change-Id: Iad8063dfa6f7ceea22981a8a8f99e65fa3b7ffa0 Reviewed-on: https://go-review.googlesource.com/c/go/+/309337 Trust: Jay Conrod <jayconrod@google.com> Run-TryBot: Jay Conrod <jayconrod@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
Diffstat (limited to 'src/cmd/go/alldocs.go')
-rw-r--r--src/cmd/go/alldocs.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go
index a713428bc2..66e78bb1ac 100644
--- a/src/cmd/go/alldocs.go
+++ b/src/cmd/go/alldocs.go
@@ -1134,12 +1134,12 @@
// writing it back to go.mod. The JSON output corresponds to these Go types:
//
// type Module struct {
-// Path string
-// Deprecated string
+// Path string
+// Version string
// }
//
// type GoMod struct {
-// Module Module
+// Module ModPath
// Go string
// Require []Require
// Exclude []Module
@@ -1147,6 +1147,11 @@
// Retract []Retract
// }
//
+// type ModPath struct {
+// Path string
+// Deprecated string
+// }
+//
// type Require struct {
// Path string
// Version string