(require 'go-mode)

(setq gofmt-command "goimports")
(add-to-list 'load-path "/home/you/goroot/misc/emacs/")
(add-hook 'before-save-hook 'gofmt-before-save)

(defun go-test ()
  "Runs tests for package in current buffer"
  (interactive)
  (compile (concat "ginkgo " (file-name-directory (buffer-file-name)))))

(provide 'tj-go)

(require 'go-mode)

(setq gofmt-command "goimports")
(add-to-list 'load-path "/home/you/goroot/misc/emacs/")
(add-hook 'before-save-hook 'gofmt-before-save)

(defun go-test ()
  "Runs tests for package in current buffer"
  (interactive)
  (compile (concat "ginkgo " (file-name-directory (buffer-file-name)))))

(define-key tj-map (kbd "r t") 'go-test)

(provide 'tj-go)

Add key binding for 'go test'
Add key binding for 'go test'

tjarratt/dotfiles,tjarratt/dotfiles