 
 The scope specifies a set of arguments, separated by spaces.
 It may be:
-1) a set of packages whose main() functions will be analyzed.
+1) a set of packages whose main functions will be analyzed.
 2) a list of *.go filenames; they will treated like as a single
    package (see #3).
-3) a single package whose main() function and/or Test* functions
+3) a single package whose main function and/or Test* functions
    will be analyzed.
 
 In the common case, this is similar to the argument(s) you would

    (setq go-guru-scope scope)))

(defun go-guru--run (mode &optional need-scope)
  "Run the Go guru in the specified MODE, passing it the
selected region of the current buffer.  If NEED-SCOPE, prompt for
a scope if not already set.  Process the output to replace each
file name with a small hyperlink.  Display the result."
  (if (not buffer-file-name)
      (error "Cannot use guru on a buffer without a file name"))
  (and need-scope

  (go-guru--run "callstack" t))

(defun go-guru-definition ()
  "Jump to the definition of the selected identifier."
  (interactive)
  ;; TODO(adonovan): use -format=sexpr when available to avoid a
  ;; dependency and to simplify parsing.
  (let* ((res (with-current-buffer (go-guru--exec "definition" nil '("-format=json"))
	       (goto-char (point-min))
	       (cdr (car (json-read)))))
	 (desc (cdr (assoc 'desc res))))
    (go-guru--goto-pos (cdr (assoc 'objpos res)))
    (message "%s" desc)))

(defun go-guru-describe ()
  "Describe the selected syntax, its kind, type and methods."
