Commit 5bb19e34 authored by Bryan C. Mills's avatar Bryan C. Mills

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: default avatarJay Conrod <jayconrod@google.com>
parent 0a3b65c4
...@@ -33,11 +33,13 @@ type Version struct { ...@@ -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"`
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment