cmd/go/internal/doc: reject meta packages in go doc#79434
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
@googlebot rescan |
|
This PR (HEAD: 1e8aaf3) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/778780. Important tips:
|
|
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/778780. |
|
Message from Gopher Robot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be During May-July and Nov-Jan the Go project is in a code freeze, during which Please don’t reply on this GitHub thread. Visit golang.org/cl/778780. |
|
Tests: |
|
Message from Rafael Affonso: Patch Set 2: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/778780. |
|
Message from Michael Matloob: Patch Set 2: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/778780. |
Meta-package names such as std, cmd, tool, work, and all are package patterns that expand to multiple packages, not single documentable packages. Today go doc std can fall through package resolution and print documentation for an unrelated first match such as archive/tar. Reject these names when they are the first argument to go doc, including the two-argument form such as go doc std Foo. Keep go doc -http std routing to the standard library page. Fixes golang#53446 Change-Id: Iaf76b2be6fec0efa6f601b7959f4bcaac7ab776d
1e8aaf3 to
3115c9c
Compare
|
This PR (HEAD: 3115c9c) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/778780. Important tips:
|
|
Message from Rafael Affonso: Patch Set 3: (3 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/778780. |
Meta-package names such as std, cmd, tool, work, and all are package
patterns that expand to multiple packages, not single documentable
packages. Today go doc std can fall through package resolution and print
documentation for an unrelated first match such as archive/tar.
Reject these names when they are the first argument to go doc, including
the two-argument form such as go doc std Foo. Keep go doc -http std
routing to the standard library page.
Fixes #53446