From: Bryan C. Mills Date: Thu, 5 Sep 2019 16:47:07 +0000 (-0400) Subject: cmd/go/internal/module: document Version usage for filesystem replacements X-Git-Tag: go1.14beta1~1148 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=5bb19e3454b91b0b8be53958a0f1b98f8b7b2c6b;p=gostls13.git 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 TryBot-Result: Gobot Gobot Reviewed-by: Jay Conrod --- diff --git a/src/cmd/go/internal/module/module.go b/src/cmd/go/internal/module/module.go index 3e0baba15b..a1a3ccfe8a 100644 --- a/src/cmd/go/internal/module/module.go +++ b/src/cmd/go/internal/module/module.go @@ -33,11 +33,13 @@ type Version struct { Path string // 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 // and uses Version = "". // Second, during MVS calculations the version "none" is used // 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"` }