godoctor.vim icon indicating copy to clipboard operation
godoctor.vim copied to clipboard

Attempt to determine GOPATH from `go env`

Open kevinkjt2000 opened this issue 6 years ago • 0 comments

Thanks for the awesome refactoring plugin!

Since I use asdf to manage my go installations and swap versions as I navigate to different directories, it would be nice if GOPATH was determined from go env as a fallback if GOPATH is missing from the environment.

└─▪ go env
...
GOPATH="/home/kevin/.asdf/installs/golang/1.12.7/packages"
...

My workaround at the moment is to rely on direnv by adding this to my ~/.envrc file:

eval "$(go env)"
export GOPATH

kevinkjt2000 avatar Jul 28 '19 04:07 kevinkjt2000