diff options
| author | Sean Liao <sean@liao.dev> | 2022-03-22 22:15:22 +0000 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2022-10-14 22:08:14 +0000 |
| commit | 37b0060c55c7984f93637e6ec6d57b6479c3e5ed (patch) | |
| tree | a6780e57ea01e3db3ce9972c52b08f7248fdf035 /_content/ref/mod.md | |
| parent | 891eaca4019156b19fd22440dea74919da1762fe (diff) | |
| download | go-x-website-37b0060c55c7984f93637e6ec6d57b6479c3e5ed.tar.xz | |
_content/ref: update module fields
Fixes golang/go#51163
Change-Id: If2390fba29786a97f789f99434ea282849264ade
Reviewed-on: https://go-review.googlesource.com/c/website/+/394818
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
Diffstat (limited to '_content/ref/mod.md')
| -rw-r--r-- | _content/ref/mod.md | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/_content/ref/mod.md b/_content/ref/mod.md index 494a19e5..b954697e 100644 --- a/_content/ref/mod.md +++ b/_content/ref/mod.md @@ -1727,19 +1727,20 @@ 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 for this module, if any - GoVersion string // go version used in module - Deprecated string // deprecation message, if any (with -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 { @@ -1841,6 +1842,7 @@ to this Go struct: ``` type Module struct { Path string // module path + Query string // version query corresponding to this version Version string // module version Error string // error loading module Info string // absolute path to cached .info file @@ -1849,6 +1851,8 @@ type Module struct { Dir string // absolute path to cached source root directory Sum string // checksum for path, version (as in go.sum) GoModSum string // checksum for go.mod (as in go.sum) + Origin any // provenance of module + Reuse bool // reuse of old module info is safe } ``` @@ -1947,11 +1951,17 @@ type Module struct { } type GoMod struct { - Module Module + Module ModPath Go string Require []Require Exclude []Module Replace []Replace + Retract []Retract +} + +type ModPath struct { + Path string + Deprecated string } type Require struct { @@ -1970,7 +1980,6 @@ type Retract struct { High string Rationale string } - ``` Note that this only describes the `go.mod` file itself, not other modules |
