1
0
mirror of https://github.com/golang/go synced 2024-11-18 19:24:39 -07:00

cmd/go/internal/module: document Version usage for filesystem replacements

Updates #34085

Change-Id: I57250d0c51a27f0bd3e223588dde9d6d955e0fcf
Reviewed-on: https://go-review.googlesource.com/c/go/+/193618
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
This commit is contained in:
Bryan C. Mills 2019-09-05 12:47:07 -04:00
parent 0a3b65c492
commit 5bb19e3454

View File

@ -33,11 +33,13 @@ type Version struct {
Path string Path string
// Version is usually a semantic version in canonical form. // Version is usually a semantic version in canonical form.
// There are two exceptions to this general rule. // There are three exceptions to this general rule.
// First, the top-level target of a build has no specific version // First, the top-level target of a build has no specific version
// and uses Version = "". // and uses Version = "".
// Second, during MVS calculations the version "none" is used // Second, during MVS calculations the version "none" is used
// to represent the decision to take no version of a given module. // to represent the decision to take no version of a given module.
// Third, filesystem paths found in "replace" directives are
// represented by a path with an empty version.
Version string `json:",omitempty"` Version string `json:",omitempty"`
} }