branch: elpa/go-mode
commit 43da2639cc83baac4e4cc203c91e5311ef929c41
Author: Dominik Honnef <[email protected]>
Commit: Dominik Honnef <[email protected]>

    Simplify go-root-and-paths by using process-lines
---
 go-mode.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/go-mode.el b/go-mode.el
index c0e4ebb..d4ae988 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -1353,8 +1353,7 @@ uncommented, otherwise a new import will be added."
           ('none (insert "\nimport (\n\t" line "\n)\n")))))))
 
 (defun go-root-and-paths ()
-  (let* ((output (split-string (shell-command-to-string (concat go-command " 
env GOROOT GOPATH"))
-                               "\n"))
+  (let* ((output (process-lines go-command "env" "GOROOT" "GOPATH"))
          (root (car output))
          (paths (split-string (cadr output) path-separator)))
     (append (list root) paths)))

Reply via email to