(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)

(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)))))

(provide 'tj-go)

Add a function to run go tests
Add a function to run go tests

tjarratt/dotfiles,tjarratt/dotfiles