-
Notifications
You must be signed in to change notification settings - Fork 18.1k
x/tools/cmd/guru: better help for implements #20024
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
Comments
User manual: http://golang.org/s/using-guru Was listed in the guru -help page. |
I saw that link and it's also unhelpful for the purpose described in the ticket, since the only described usage for "implements" is a GIF of highlighting text in a text editor |
Seems like you didn't even read my quote, guess I found where the issue is...
|
I read your quote. The problem is that other tools *not* designed to be
used from text editors now say "this is deprecated, use guru" but guru is a
poor fit for their use cases.
On Tue, Apr 18, 2017 at 15:19 stemar94 ***@***.***> wrote:
Seems like you didn't even read my quote, guess I found where the issue
is...
*Although guru is a command-line tool, it is intended to be executed by
your editor.*
The output of most guru queries is a list of diagnostics, each prefixed by
a source file name, line number, and column number, similar to the
diagnostic output of a typical compiler. Most editors can display compiler
output in a buffer so that clicking on a diagnostic opens the relevant
source file at the right position.
User manual: http://golang.org/s/using-guru
Was listed in the guru -help page.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#20024 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAOSI0zeGqu19Q6Zmn6BtOwOHV1vLzjlks5rxTcGgaJpZM4NAd3w>
.
--
…--
Kevin Burke
925.271.7005 | kev.inburke.com
|
So that's then the fault of those tool maintainers or isn't it? |
I think it's a good idea to improve the help here, or make the tool able to support passing in type names, or line and column numbers rather than file byte offsets. The command help doesn't describe the supported formats either. Regardless of who's fault it is, it's confusing to people who are trying to use Go if various documents are pointing them at Regardless, this StackOverflow answer helped me: https://stackoverflow.com/a/31759333/1037465 It turns out that the local I'd rather be able to type |
Correction: guru requires an offset instead of a line number. |
guru was deleted in #65880; closing as obsolete. Incidentally, gopls has the same issue. |
I'm trying to find all interfaces in the standard library that implement
io.Reader
or are calledNewDecoder
. I thoughtguru
would be able to help with this but I was unable to figure out how to use it correctly.guru help implements
displays the generic help text.guru implements -h
orguru implements help
print:guru implements -scope github.com/golang/go/src/... io.Reader
prints simply:Reading the help text more carefully now, I see that I'm supposed to pass a filename and a line number as the
position
argument. This is a little confusing, I think, since other "implements" tools (dominikh/implements, "go oracle") said that this was a drop in replacement, and neither of them required filenames or line numbers, I don't think.Maybe I am an idiot and maybe I should read more carefully but I wasn't able to find examples of successful usage when searching Google, and I wasn't able to get it to work, and it's possible that other users are having the same problems.
The text was updated successfully, but these errors were encountered: