@@ -214,6 +214,8 @@ look like others."
214
214
:type '(repeat function)
215
215
:group 'go )
216
216
217
+ (make-obsolete-variable 'go-guess-gopath-functions " GOPATH has been deprecated in favour of Go modules." " 1.7.0" )
218
+
217
219
(defcustom go-confirm-playground-uploads t
218
220
" Ask before uploading code to the public Go Playground.
219
221
@@ -1749,8 +1751,6 @@ The following extra functions are defined:
1749
1751
- `go-download-play'
1750
1752
- `godef-describe' and `godef-jump'
1751
1753
- `go-coverage'
1752
- - `go-set-project'
1753
- - `go-reset-gopath'
1754
1754
1755
1755
If you want to automatically run `gofmt' before saving a file,
1756
1756
add the following hook to your Emacs configuration:
@@ -2760,6 +2760,7 @@ returned."
2760
2760
2761
2761
(defun go-guess-gopath (&optional buffer )
2762
2762
" Determine a suitable GOPATH for BUFFER, or the current buffer if BUFFER is nil."
2763
+ (declare (obsolete " GOPATH has been deprecated in favour of Go modules." " 1.7.0" ))
2763
2764
(with-current-buffer (or buffer (current-buffer ))
2764
2765
(let ((gopath (cl-some (lambda (el ) (funcall el))
2765
2766
go-guess-gopath-functions)))
@@ -2772,6 +2773,7 @@ returned."
2772
2773
(defun go-plain-gopath ()
2773
2774
" Detect a normal GOPATH, by looking for the first `src'
2774
2775
directory up the directory tree."
2776
+ (declare (obsolete " GOPATH has been deprecated in favour of Go modules." " 1.7.0" ))
2775
2777
(let ((d (locate-dominating-file buffer-file-name " src" )))
2776
2778
(if d
2777
2779
(list d))))
@@ -2787,6 +2789,7 @@ of when Emacs was started.
2787
2789
This function can for example be used as a
2788
2790
projectile-switch-project-hook, or simply be called manually when
2789
2791
switching projects."
2792
+ (declare (obsolete " GOPATH has been deprecated in favour of Go modules." " 1.7.0" ))
2790
2793
(interactive )
2791
2794
(let ((gopath (or (go-guess-gopath buffer)
2792
2795
(go-original-gopath))))
@@ -2795,13 +2798,15 @@ switching projects."
2795
2798
2796
2799
(defun go-reset-gopath ()
2797
2800
" Reset GOPATH to the value it had when Emacs started."
2801
+ (declare (obsolete " GOPATH has been deprecated in favour of Go modules." " 1.7.0" ))
2798
2802
(interactive )
2799
2803
(let ((gopath (go-original-gopath)))
2800
2804
(setenv " GOPATH" gopath)
2801
2805
(message " Set GOPATH to %s " gopath)))
2802
2806
2803
2807
(defun go-original-gopath ()
2804
2808
" Return the original value of GOPATH from when Emacs was started."
2809
+ (declare (obsolete " GOPATH has been deprecated in favour of Go modules." " 1.7.0" ))
2805
2810
(let ((process-environment initial-environment)) (getenv " GOPATH" )))
2806
2811
2807
2812
(defun go--insert-modified-files ()
0 commit comments