aboutsummaryrefslogtreecommitdiff
path: root/_content/ref/mod.md
diff options
context:
space:
mode:
authorBryan C. Mills <bcmills@google.com>2021-10-28 22:19:39 -0400
committerGopher Robot <gobot@golang.org>2024-03-15 21:50:09 +0000
commit3e18747147e17de19023de7a334c5a8508cbdff1 (patch)
tree28d91cd67558a881a5f5ee728cf01fc3de9b773d /_content/ref/mod.md
parent93a704f46f7b9ad6834a7d36d00e111051f6a5fb (diff)
downloadgo-x-website-3e18747147e17de19023de7a334c5a8508cbdff1.tar.xz
_content/ref/mod: document dotless module paths
Fixes golang/go#32819 For golang/go#37641 Change-Id: Icbf33337f1b35d47a44ddd7512ce4f7d0f8a0d56 Reviewed-on: https://go-review.googlesource.com/c/website/+/359594 Auto-Submit: Bryan Mills <bcmills@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Diffstat (limited to '_content/ref/mod.md')
-rw-r--r--_content/ref/mod.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/_content/ref/mod.md b/_content/ref/mod.md
index 642b44d2..9026ae5a 100644
--- a/_content/ref/mod.md
+++ b/_content/ref/mod.md
@@ -72,6 +72,16 @@ so that the `go` command can find and download the module. There are also
several [lexical restrictions](#go-mod-file-ident) on characters allowed in
module paths.
+A module that will never be fetched as a dependency of any other module may use
+any valid package path for its module path, but must take care not to collide
+with paths that may be used by the module's dependencies or the Go standard
+library. The Go standard library uses package paths that do not contain a dot in
+the first path element, and the `go` command does not attempt to resolve such
+paths from network servers. The paths `example` and `test` are reserved for
+users: they will not be used in the standard library and are suitable for use in
+self-contained modules, such as those defined in tutorials or example code or
+created and manipulated as part of a test.
+
### Versions {#versions}
A <dfn>version</dfn> identifies an immutable snapshot of a module, which may be