tools/cmd/guru
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
..
serial cmd/guru: support streaming plain and -json output 2016-04-11 19:51:55 +00:00
testdata/src cmd/guru: support streaming plain and -json output 2016-04-11 19:51:55 +00:00
callees.go cmd/guru: support streaming plain and -json output 2016-04-11 19:51:55 +00:00
callers.go cmd/guru: support streaming plain and -json output 2016-04-11 19:51:55 +00:00
callstack.go cmd/guru: support streaming plain and -json output 2016-04-11 19:51:55 +00:00
definition.go cmd/guru: support streaming plain and -json output 2016-04-11 19:51:55 +00:00
describe.go cmd/guru: support streaming plain and -json output 2016-04-11 19:51:55 +00:00
emacs-test.bash cmd/guru: in Emacs, change 'definition' to jump directly 2016-02-15 17:57:16 +00:00
freevars.go cmd/guru: support streaming plain and -json output 2016-04-11 19:51:55 +00:00
go-guru.el cmd/guru: support streaming plain and -json output 2016-04-11 19:51:55 +00:00
guru.go cmd/guru: support streaming plain and -json output 2016-04-11 19:51:55 +00:00
guru.vim cmd/guru: clean ups to command-line interface 2016-02-12 21:50:49 +00:00
guru_test.go cmd/guru: support streaming plain and -json output 2016-04-11 19:51:55 +00:00
implements.go cmd/guru: support streaming plain and -json output 2016-04-11 19:51:55 +00:00
main.go cmd/guru: support streaming plain and -json output 2016-04-11 19:51:55 +00:00
peers.go cmd/guru: support streaming plain and -json output 2016-04-11 19:51:55 +00:00
pointsto.go cmd/guru: support streaming plain and -json output 2016-04-11 19:51:55 +00:00
pos.go cmd/guru: fix nil deref when position is not in Go source 2016-03-07 15:53:42 +00:00
referrers.go cmd/guru: support streaming plain and -json output 2016-04-11 19:51:55 +00:00
what.go cmd/guru: support streaming plain and -json output 2016-04-11 19:51:55 +00:00
whicherrs.go cmd/guru: support streaming plain and -json output 2016-04-11 19:51:55 +00:00