go升级1.7后vim-go定义跳转问题

升级go1.7.3后发现:GoDef不能跳转到标准库代码定义,报错!

发现还在1.6.2的路径下去找,但是我已经删除了,最后发现是忽略了go工具链升级的事情。

排查过程中怀疑是GOROOT环境变量问题,但是.bash_profile中并没有设置,vim环境中也检查过,并没有GOROOT这个环境变量,最后推断是go工具链在编译时就确定了。

:GoUpdateBinaries 升级go工具链就解决了。

以后每次升级Go都注意要更新下工具链,不然查找源码目录都是不对的!

下面是具体更新的go tools:

vim-go: Updating gocode. Reinstalling github.com/nsf/gocode to folder /Users/Jerry/go/bin
vim-go: Updating gometalinter. Reinstalling github.com/alecthomas/gometalinter to folder /Users/Jerry/go/bin
vim-go: Updating goimports. Reinstalling golang.org/x/tools/cmd/goimports to folder /Users/Jerry/go/bin
vim-go: Updating guru. Reinstalling golang.org/x/tools/cmd/guru to folder /Users/Jerry/go/bin
vim-go: Updating gorename. Reinstalling golang.org/x/tools/cmd/gorename to folder /Users/Jerry/go/bin
vim-go: Updating golint. Reinstalling github.com/golang/lint/golint to folder /Users/Jerry/go/bin
vim-go: Updating godef. Reinstalling github.com/rogpeppe/godef to folder /Users/Jerry/go/bin
vim-go: Updating errcheck. Reinstalling github.com/kisielk/errcheck to folder /Users/Jerry/go/bin
vim-go: Updating gotags. Reinstalling github.com/jstemmer/gotags to folder /Users/Jerry/go/bin
vim-go: Updating asmfmt. Reinstalling github.com/klauspost/asmfmt/cmd/asmfmt to folder /Users/Jerry/go/bin
vim-go: Updating motion. Reinstalling github.com/fatih/motion to folder /Users/Jerry/go/bin
vim-go: Updating gogetdoc. Reinstalling github.com/zmb3/gogetdoc to folder /Users/Jerry/go/bin
vim-go: Updating impl. Reinstalling github.com/josharian/impl to folder /Users/Jerry/go/bin