Skip to content

Commit 5bb19e3

Browse files
author
Bryan C. Mills
committed
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 <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Jay Conrod <[email protected]>
1 parent 0a3b65c commit 5bb19e3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/cmd/go/internal/module/module.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,13 @@ type Version struct {
3333
Path string
3434

3535
// Version is usually a semantic version in canonical form.
36-
// There are two exceptions to this general rule.
36+
// There are three exceptions to this general rule.
3737
// First, the top-level target of a build has no specific version
3838
// and uses Version = "".
3939
// Second, during MVS calculations the version "none" is used
4040
// to represent the decision to take no version of a given module.
41+
// Third, filesystem paths found in "replace" directives are
42+
// represented by a path with an empty version.
4143
Version string `json:",omitempty"`
4244
}
4345

0 commit comments

Comments
 (0)