Skip to content

Commit 3e18747

Browse files
Bryan C. Millsgopherbot
Bryan C. Mills
authored andcommitted
_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 <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]>
1 parent 93a704f commit 3e18747

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Diff for: _content/ref/mod.md

+10
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,16 @@ so that the `go` command can find and download the module. There are also
7272
several [lexical restrictions](#go-mod-file-ident) on characters allowed in
7373
module paths.
7474

75+
A module that will never be fetched as a dependency of any other module may use
76+
any valid package path for its module path, but must take care not to collide
77+
with paths that may be used by the module's dependencies or the Go standard
78+
library. The Go standard library uses package paths that do not contain a dot in
79+
the first path element, and the `go` command does not attempt to resolve such
80+
paths from network servers. The paths `example` and `test` are reserved for
81+
users: they will not be used in the standard library and are suitable for use in
82+
self-contained modules, such as those defined in tutorials or example code or
83+
created and manipulated as part of a test.
84+
7585
### Versions {#versions}
7686

7787
A <dfn>version</dfn> identifies an immutable snapshot of a module, which may be

0 commit comments

Comments
 (0)