Skip to content

Commit 37b0060

Browse files
seankhliaogopherbot
authored andcommitted
_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 <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Bryan Mills <[email protected]> Run-TryBot: Bryan Mills <[email protected]> Auto-Submit: Bryan Mills <[email protected]>
1 parent 891eaca commit 37b0060

File tree

1 file changed

+24
-15
lines changed

1 file changed

+24
-15
lines changed

_content/ref/mod.md

+24-15
Original file line numberDiff line numberDiff line change
@@ -1727,19 +1727,20 @@ to a Go struct, but now a `Module` struct:
17271727

17281728
```
17291729
type Module struct {
1730-
Path string // module path
1731-
Version string // module version
1732-
Versions []string // available module versions (with -versions)
1733-
Replace *Module // replaced by this module
1734-
Time *time.Time // time version was created
1735-
Update *Module // available update, if any (with -u)
1736-
Main bool // is this the main module?
1737-
Indirect bool // is this module only an indirect dependency of main module?
1738-
Dir string // directory holding files for this module, if any
1739-
GoMod string // path to go.mod file for this module, if any
1740-
GoVersion string // go version used in module
1741-
Deprecated string // deprecation message, if any (with -u)
1742-
Error *ModuleError // error loading module
1730+
Path string // module path
1731+
Version string // module version
1732+
Versions []string // available module versions
1733+
Replace *Module // replaced by this module
1734+
Time *time.Time // time version was created
1735+
Update *Module // available update (with -u)
1736+
Main bool // is this the main module?
1737+
Indirect bool // module is only indirectly needed by main module
1738+
Dir string // directory holding local copy of files, if any
1739+
GoMod string // path to go.mod file describing module, if any
1740+
GoVersion string // go version used in module
1741+
Retracted []string // retraction information, if any (with -retracted or -u)
1742+
Deprecated string // deprecation message, if any (with -u)
1743+
Error *ModuleError // error loading module
17431744
}
17441745
17451746
type ModuleError struct {
@@ -1841,6 +1842,7 @@ to this Go struct:
18411842
```
18421843
type Module struct {
18431844
Path string // module path
1845+
Query string // version query corresponding to this version
18441846
Version string // module version
18451847
Error string // error loading module
18461848
Info string // absolute path to cached .info file
@@ -1849,6 +1851,8 @@ type Module struct {
18491851
Dir string // absolute path to cached source root directory
18501852
Sum string // checksum for path, version (as in go.sum)
18511853
GoModSum string // checksum for go.mod (as in go.sum)
1854+
Origin any // provenance of module
1855+
Reuse bool // reuse of old module info is safe
18521856
}
18531857
```
18541858

@@ -1947,11 +1951,17 @@ type Module struct {
19471951
}
19481952
19491953
type GoMod struct {
1950-
Module Module
1954+
Module ModPath
19511955
Go string
19521956
Require []Require
19531957
Exclude []Module
19541958
Replace []Replace
1959+
Retract []Retract
1960+
}
1961+
1962+
type ModPath struct {
1963+
Path string
1964+
Deprecated string
19551965
}
19561966
19571967
type Require struct {
@@ -1970,7 +1980,6 @@ type Retract struct {
19701980
High string
19711981
Rationale string
19721982
}
1973-
19741983
```
19751984

19761985
Note that this only describes the `go.mod` file itself, not other modules

0 commit comments

Comments
 (0)