         (message "Removed %d imports" (length lines)))
       (if flymake-state (flymake-mode-on)))))
 
-(defun godef--find-file-line-column (specifier)
+(defun godef--find-file-line-column (specifier other-window)
   "Given a file name in the format of `filename:line:column',
 visit FILENAME and go to line LINE and column COLUMN."
   (let* ((components (split-string specifier ":"))
          (line (string-to-number (nth 1 components)))
          (column (string-to-number (nth 2 components))))
-    (with-current-buffer (find-file (car components))
+    (with-current-buffer (funcall (if other-window 'find-file-other-window 'find-file) (car components))
       (goto-char (point-min))
       (forward-line (1- line))
       (beginning-of-line)

          (message "%s" file))
         (t
          (push-mark)
          (godef--find-file-line-column file))))
    (file-error (message "Could not run godef binary"))))

(provide 'go-mode)

;;; go-mode.el ends here

    (define-key m "=" 'go-mode-insert-and-indent)
    (define-key m (kbd "C-c C-a") 'go-import-add)
    (define-key m (kbd "C-c C-j") 'godef-jump)
    (define-key m (kbd "C-x 4 C-c C-j") 'godef-jump-other-window)
    (define-key m (kbd "C-c C-d") 'godef-describe)
    m)
  "Keymap used by Go mode to implement electric keys.")
