]> Cypherpunks repositories - gostls13.git/commit
cmd/doc: allow go doc -http without package in current directory
authorMichael Matloob <matloob@golang.org>
Wed, 21 May 2025 16:18:03 +0000 (12:18 -0400)
committerMichael Matloob <matloob@golang.org>
Wed, 21 May 2025 16:58:00 +0000 (09:58 -0700)
commit2a5ac1a993efc463efdce7996efd356dabf03a25
tree6e962316264f4526308edc29fc124f009f9468cb
parent8b45a3f78b178ce66f419038a664cbd6a82ada54
cmd/doc: allow go doc -http without package in current directory

go doc tries to find a package to display documentation for. In the case
that no package is provided, it uses "." just like go list does. So if
go doc -http is run without any arguments, it tries to show the
documentation for the package in the current directory. As a special
case, if no arguments are provided, allow no package to match the
current directory and just open the root pkgsite page.

For #68106

Change-Id: I6d65b160a838591db953fac630eced6b09106877
Reviewed-on: https://go-review.googlesource.com/c/go/+/675075
Reviewed-by: Alan Donovan <adonovan@google.com>
Reviewed-by: Michael Matloob <matloob@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/cmd/doc/main.go