Created
January 22, 2012 14:52
-
-
Save lclarkmichalek/1657284 to your computer and use it in GitHub Desktop.
Flymake mode for golang
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'flymake) | |
(defvar go-compiler "8g") | |
(defun flymake-go-init () | |
(let* ((temp-file (flymake-init-create-temp-buffer-copy | |
'flymake-create-temp-inplace)) | |
(local-file (file-relative-name | |
temp-file | |
(file-name-directory buffer-file-name)))) | |
(list go-compiler (list "-o" "/dev/null" temp-file)))) | |
(push '(".+\\.go$" flymake-go-init) flymake-allowed-file-name-masks) | |
(add-hook 'go-mode-hook 'flymake-mode) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment