Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/doc: go doc <Symbol> shows "." as package import path #60645

Open
hyangah opened this issue Jun 6, 2023 · 2 comments
Open

cmd/doc: go doc <Symbol> shows "." as package import path #60645

hyangah opened this issue Jun 6, 2023 · 2 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@hyangah
Copy link
Contributor

hyangah commented Jun 6, 2023

What version of Go are you using (go version)?

$ go version
go version devel go1.21-4dae3bbe0e Tue Jun 6 20:24:31 2023 +0000 darwin/amd64

Does this issue reproduce with the latest release?

Yes

What did you do?

Ran go doc <symbol>

project/mod/modfile$ go doc AutoQuote
package modfile // import "."
...

See // import ".".
Compare it with the package doc mode output.

project/mod/modfile$ go doc
package modfile // import "golang.org/x/mod/modfile"
...

What did you expect to see?

Current package's import path.

What did you see instead?

Always // import ".".

@prattmic prattmic added this to the Backlog milestone Jun 12, 2023
@prattmic prattmic added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jun 12, 2023
@prattmic
Copy link
Member

I think the "." comes from https://cs.opensource.google/go/go/+/refs/heads/master:src/cmd/doc/main.go;l=266;drc=ee46f0b5084461978432aa20df003ac52500b0f0, but it isn't clear to me if this is a bug in cmd/doc or go/build.

cc @griesemer @robpike @mvdan @bcmills

@prattmic
Copy link
Member

Oops, I misread https://dev.golang.org/owners, that should be cc @rsc for go/build, not @griesemer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

2 participants