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

godoc: wrong import path shown for non-primary packages of a directory with multiple packages #3922

Closed
griesemer opened this issue Aug 7, 2012 · 3 comments

Comments

@griesemer
Copy link
Contributor

What steps will reproduce the problem?
1. Under $GOROOT/pkg, create directory p
2. In $GOROOT/pkg/p, create p.go with package clause "package p"
3. In $GOROOT/pkg/p, create q.go with package clause "package q"
4. Point godoc at: /pkg/p/?p=q

What is the expected output? What do you see instead?

The import path should say "import q" (or something like that - the go tool
does not really handle this situation); at the moment it says: "import p"
which is clearly not right.
@adg
Copy link
Contributor

adg commented Aug 8, 2012

Comment 1:

(( do you mean $GOROOT/src/pkg/ ? ))
The go tool disallows multiple packages in a directory, and godoc should do the same.

@griesemer
Copy link
Contributor Author

Comment 2:

I am happy to remove all code dealing with multiple packages in directories, but I am
not convinced yet it is the right approach. For one, godoc should probably still show
what it found somehow (a list of packages?) and not simply show nothing - so at least
some of the logic will have to remain. Furthermore, there are other ways to build a
binary.

@griesemer
Copy link
Contributor Author

Comment 3:

This issue was closed by revision f597fa6.

Status changed to Fixed.

@griesemer griesemer self-assigned this Aug 9, 2012
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants