1
0
mirror of https://github.com/golang/go synced 2024-10-01 10:38:33 -06:00
Commit Graph

8 Commits

Author SHA1 Message Date
Koichi Shiraishi
be3ddffac4 cmd/guru: fix several functions godoc comment prefix
The several functions not exported, Use "The xxx function ..." rule.

Change-Id: Iaba2490b4a9675213f70d055bd9ded9e5a245aa5
Reviewed-on: https://go-review.googlesource.com/c/47872
Reviewed-by: Alan Donovan <adonovan@google.com>
2018-10-11 18:05:12 +00:00
David R. Jenni
cc429c273c x/tools/cmd/guru: gofmt -s -w
Change-Id: Idf3d1865b0c349ad45d983fac1c52e7729bf0069
Reviewed-on: https://go-review.googlesource.com/32793
Reviewed-by: Alan Donovan <adonovan@google.com>
2017-02-15 21:41:53 +00:00
Rebecca Stambler
e64f1a4c63 cmd/guru: add workaround to handle inconsistency between go/types and gc
Add identical workaround from gorename to guru. Only affects queries
that typecheck the code first.

Fixes golang/go#16530

Change-Id: I718cfceb8d26868eea9128c8873b164333c50f53
Reviewed-on: https://go-review.googlesource.com/33359
Reviewed-by: Alan Donovan <adonovan@google.com>
2016-11-23 20:09:00 +00:00
Alan Donovan
0e041570eb cmd/guru: revert support for Go 1.8 aliases
Change-Id: I8ba368d5036be47b6d64e3576f366eb0301d2d5b
Reviewed-on: https://go-review.googlesource.com/32831
Reviewed-by: Robert Griesemer <gri@golang.org>
2016-11-04 21:18:07 +00:00
Alan Donovan
4549178751 x/tools: clone some files in preparation for alias changes
This CL only copies files and updates build tags.
Substantive changes will come in follow-ups.
This is a workaround for git's lack of rename/copy tracking.

Tested with go1.6, go1.7, and tip (go1.8).

Change-Id: Id88a05273fb963586b228d5e5dfacab32133a960
Reviewed-on: https://go-review.googlesource.com/32630
Reviewed-by: Robert Griesemer <gri@golang.org>
2016-11-02 16:57:37 +00:00
Alan Donovan
2da0720e4f cmd/guru: support streaming plain and -json output
Visible changes:
- "referrers" queries now emit a stream of results,
  so they start appearing quickly even in large queries.
  We no longer report the total number of matches.
- packageReferrers now also uses AfterTypeCheck hook and streaming.
- XML support has been dropped.
- The -format flag has been replaced by -json.

JSON protocol changes:
- The enclosing Result struct has been removed.
- Likewise the 'mode' field (since the caller knows it already)
- "freevars" and "referrers" now emit a stream of objects
  In the case of referrers, the first object has a different from the rest.
- The "referrers" results include the text of the matching line
  (parity with -json=false)

Implementation details:
- the concurrency-safe q.Output function can be called
  many times, each with a queryResult to print.
- fset is no longer saved in Query (cleaner)
- queryResult methods renamed PrintPlain, JSON

Change-Id: I41a4e3f57f266fcf043ece4045bca82c6f6a356f
Reviewed-on: https://go-review.googlesource.com/21397
Reviewed-by: Michael Matloob <matloob@golang.org>
2016-04-11 19:51:55 +00:00
Alan Donovan
37bb37ec1c cmd/guru: fix bad import, and run gofmt
Change-Id: Ieb5c732bad494942f7b45ac5a1b605e810436e87
Reviewed-on: https://go-review.googlesource.com/19478
Reviewed-by: Alan Donovan <adonovan@google.com>
2016-02-12 03:58:01 +00:00
Alan Donovan
7347379304 cmd/guru: rename oracle to guru, copying it to a single package
See plans at:
https://docs.google.com/document/d/1UErU12vR7jTedYvKHVNRzGPmXqdMASZ6PfE7B-p6sIg/edit#heading=h.t5rbcuy7di7j

Change-Id: I369747e0ce8cd42a2975eb0f651a2e5fba47cf9e
Reviewed-on: https://go-review.googlesource.com/19475
Reviewed-by: Alan Donovan <adonovan@google.com>
2016-02-12 03:38:58 +00:00