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

x/tools/cmd/guru: whicherrs doesn't always output something useful #14736

Open
dominikh opened this issue Mar 9, 2016 · 0 comments
Open

x/tools/cmd/guru: whicherrs doesn't always output something useful #14736

dominikh opened this issue Mar 9, 2016 · 0 comments
Labels
Milestone

Comments

@dominikh
Copy link
Member

@dominikh dominikh commented Mar 9, 2016

The following query should probably output something saying that there's no useful information, or that the error is always nil:

$ cat $GOPATH/src/foo/foo.go
package main

func foo() error { return nil }

func main() {
    err := foo()
    _ = err
}
$ guru -scope foo whicherrs $GOPATH/src/foo/foo.go:\#64
$

Similarly, the following query should either say that there are no useful information, or that there are errors returned that aren't global variables:

$ cat $GOPATH/src/foo/foo.go
package main

import "errors"

func foo() error { return errors.New("an error") }

func main() {
    err := foo()
    _ = err
}
$ guru -scope foo whicherrs $GOPATH/src/foo/foo.go:\#100
$

/cc @alandonovan @DanielMorsing

@bradfitz bradfitz modified the milestone: Unreleased Apr 9, 2016
@gopherbot gopherbot added the Tools label Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.