summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--emacs.d/modes/lang-go.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/emacs.d/modes/lang-go.el b/emacs.d/modes/lang-go.el
index 8d81f2c..0b56bd9 100644
--- a/emacs.d/modes/lang-go.el
+++ b/emacs.d/modes/lang-go.el
@@ -1,3 +1,8 @@
+(when (memq window-system '(mac ns x))
+    (dolist (var '("GOPATH" "GO15VENDOREXPERIMENT"))
+      (unless (getenv var)
+        (exec-path-from-shell-copy-env var))))
+
 (use-package go-mode
   :ensure t
   :defer t