From 9dcf04373f70aa5db656aa0e9feb24bde996a440 Mon Sep 17 00:00:00 2001 From: GrĂ©goire DuchĂȘne Date: Sun, 8 Nov 2020 11:11:43 +0000 Subject: emacs: Only use goimports if found --- emacs/init.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/emacs/init.el b/emacs/init.el index c0a2d7f..f59d64d 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -79,7 +79,8 @@ (use-package go-mode :init - (setq gofmt-command "goimports") + (when (executable-find "goimports") + (setq gofmt-command "goimports")) (add-hook 'go-mode-hook (lambda () (setq tab-width 2) -- cgit v1.2.3-70-g09d2