 		   (insert-buffer-substring b))))
 	(buffer-list)))
 
+(defun go-guru--goto-pos (posn)
+  "Find the file containing the position POSN (of the form `file:line:col')
+set the point to it, switching the current buffer."
+  (let ((file-line-pos (split-string posn ":")))
+    (find-file (car file-line-pos))
+    (goto-char (point-min))
+    ;; NB: go/token's column offsets are byte- not rune-based.
+    (forward-line (1- (string-to-number (cadr file-line-pos))))
+    (forward-char (1- (string-to-number (caddr file-line-pos))))))
+
 (defun go-guru-callees ()
   "Show possible callees of the function call at the current point."
   (interactive)

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

(defun go-guru-definition ()
  "Show the definition of the selected identifier."
  (interactive)
  (go-guru--run "definition"))

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


(require 'compile)
(require 'go-mode)
(require 'json)
(require 'simple)
(require 'cl)

