This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/layers/+lang/go/funcs.el
syl20bnr 33ead6fc42 Deprecation of extensions and <pkg>-excluded-packages variables
As announced in previous releases, see CHANGELOG.next for more info
in the Breaking Changes section.
2016-01-17 22:06:04 -05:00

22 lines
685 B
EmacsLisp

;;; funcs.el --- Go Layer functions File for Spacemacs
;;
;; Copyright (c) 2012-2016 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(defun load-gopath-file(gopath name)
"Search for NAME file in all paths referenced in GOPATH."
(let* ((sep (if (spacemacs/system-is-mswindows) ";" ":"))
(paths (split-string gopath sep))
found)
(loop for p in paths
for file = (concat p name) when (file-exists-p file)
do
(load-file file)
(setq found t)
finally return found)))