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 cannot distinguish a variable from a package name #465

Closed
ersiner opened this issue Jun 21, 2015 · 1 comment
Closed

GoDoc cannot distinguish a variable from a package name #465

ersiner opened this issue Jun 21, 2015 · 1 comment

Comments

@ersiner
Copy link

ersiner commented Jun 21, 2015

Consider the following code snippet:

var lines []string
scanner := bufio.NewScanner(file)
for scanner.Scan() {
  lines = append(lines, scanner.Text())
}

When I try to lookup documentation for Scan(), GoDocBrowser tries to open https://godoc.org/scanner#Scan as if scanner is a package name and if course it's not correct.

@fatih
Copy link
Owner

fatih commented Jun 22, 2015

Thanks @ersiner for reporting. I'm aware of this problem. We need to change :GoDoc to find the underlying identifier to match and jump to the doc directly. I'm closing this in favor of the duplicate already open issue #332 (which is not yet resolved).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants