-
-
Save lstoll/2411499 to your computer and use it in GitHub Desktop.
Flymake mode for golang
This file contains 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) | |
(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" (list "build" "-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