]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go/internal/list: update help info with Deprecated field
authorSean Liao <sean@liao.dev>
Tue, 22 Mar 2022 22:00:22 +0000 (22:00 +0000)
committerBryan Mills <bcmills@google.com>
Fri, 24 Jun 2022 18:54:27 +0000 (18:54 +0000)
Also align Retracted documentation with actual type of []string

Fixes #51876

Change-Id: I3b34e53424aa7ee5330eb71adac23510fff91798
Reviewed-on: https://go-review.googlesource.com/c/go/+/394677
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
src/cmd/go/alldocs.go
src/cmd/go/internal/list/list.go

index d770ad82e555cb8ea8b74818a20c1fa6227f5d82..fdb7a085b09275dfe8bb3c926337f186ac22e8d8 100644 (file)
 // applied to a Go struct, but now a Module struct:
 //
 //     type Module struct {
-//         Path      string       // module path
-//         Version   string       // module version
-//         Versions  []string     // available module versions (with -versions)
-//         Replace   *Module      // replaced by this module
-//         Time      *time.Time   // time version was created
-//         Update    *Module      // available update, if any (with -u)
-//         Main      bool         // is this the main module?
-//         Indirect  bool         // is this module only an indirect dependency of main module?
-//         Dir       string       // directory holding files for this module, if any
-//         GoMod     string       // path to go.mod file used when loading this module, if any
-//         GoVersion string       // go version used in module
-//         Retracted string       // retraction information, if any (with -retracted or -u)
-//         Error     *ModuleError // error loading module
+//         Path       string        // module path
+//         Version    string        // module version
+//         Versions   []string      // available module versions
+//         Replace    *Module       // replaced by this module
+//         Time       *time.Time    // time version was created
+//         Update     *Module       // available update (with -u)
+//         Main       bool          // is this the main module?
+//         Indirect   bool          // module is only indirectly needed by main module
+//         Dir        string        // directory holding local copy of files, if any
+//         GoMod      string        // path to go.mod file describing module, if any
+//         GoVersion  string        // go version used in module
+//         Retracted  []string      // retraction information, if any (with -retracted or -u)
+//         Deprecated string        // deprecation message, if any (with -u)
+//         Error      *ModuleError  // error loading module
 //     }
 //
 //     type ModuleError struct {
index 770127c1cd320404776ee1fd9e2307aad3552675..9c651f2bf37991ca6709b7c9e8fe2521320bd04a 100644 (file)
@@ -222,19 +222,20 @@ When listing modules, the -f flag still specifies a format template
 applied to a Go struct, but now a Module struct:
 
     type Module struct {
-        Path      string       // module path
-        Version   string       // module version
-        Versions  []string     // available module versions (with -versions)
-        Replace   *Module      // replaced by this module
-        Time      *time.Time   // time version was created
-        Update    *Module      // available update, if any (with -u)
-        Main      bool         // is this the main module?
-        Indirect  bool         // is this module only an indirect dependency of main module?
-        Dir       string       // directory holding files for this module, if any
-        GoMod     string       // path to go.mod file used when loading this module, if any
-        GoVersion string       // go version used in module
-        Retracted string       // retraction information, if any (with -retracted or -u)
-        Error     *ModuleError // error loading module
+        Path       string        // module path
+        Version    string        // module version
+        Versions   []string      // available module versions
+        Replace    *Module       // replaced by this module
+        Time       *time.Time    // time version was created
+        Update     *Module       // available update (with -u)
+        Main       bool          // is this the main module?
+        Indirect   bool          // module is only indirectly needed by main module
+        Dir        string        // directory holding local copy of files, if any
+        GoMod      string        // path to go.mod file describing module, if any
+        GoVersion  string        // go version used in module
+        Retracted  []string      // retraction information, if any (with -retracted or -u)
+        Deprecated string        // deprecation message, if any (with -u)
+        Error      *ModuleError  // error loading module
     }
 
     type ModuleError struct {