From 5bb19e3454b91b0b8be53958a0f1b98f8b7b2c6b Mon Sep 17 00:00:00 2001 From: "Bryan C. Mills" Date: Thu, 5 Sep 2019 12:47:07 -0400 Subject: [PATCH] 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 --- src/cmd/go/internal/module/module.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cmd/go/internal/module/module.go b/src/cmd/go/internal/module/module.go index 3e0baba15b3ec8..a1a3ccfe8ac4b9 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"` }