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/go: Path passed to doc tool is resolved to an absolute path #3648

Closed
gopherbot opened this issue May 21, 2012 · 1 comment
Closed

cmd/go: Path passed to doc tool is resolved to an absolute path #3648

gopherbot opened this issue May 21, 2012 · 1 comment

Comments

@gopherbot
Copy link

by kballard:

The godoc command will print whatever path you feed it as the import line in the
resulting output. This is typically the desired behavior. However, when driven with the
go command (as in `go doc path`), the go cmd seems to resolve the path to an absolute
path before passing it to godoc, which results in an import line that shows an absolute
path. This is never desired.

1. Run `godoc fmt`
2. Run `go doc fmt`

The first command emits the correct output, including
    import "fmt"

The second command emits an absolute path for the import line, as in
    import "/usr/local/go/src/pkg/fmt"

Which operating system are you using?
Darwin 12.0.0

Which version are you using?  (run 'go version')
go1.0.1
@rsc
Copy link
Contributor

rsc commented May 21, 2012

Comment 1:

Fixed at tip.
changeset:   13214:5b1e024a5e89
user:        Russ Cox <rsc@golang.org>
date:        Tue May 15 12:53:57 2012 -0400
summary:     cmd/go: invoke godoc with import path when possible

Labels changed: added go1.0.2.

Status changed to Fixed.

@rsc rsc added this to the Go1.0.2 milestone Apr 14, 2015
@rsc rsc removed the go1.0.2 label Apr 14, 2015
@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

2 participants