Vim-go: :GoCallers uses old $GOROOT

Created on 11 Sep 2016  路  3Comments  路  Source: fatih/vim-go

After updating go from Ubuntu package to latest manual download, :GoCallers gives me a long list of the following errors:

vim-go: /home/andrej/go/src/github.com/gorilla/context/context.go:8:2: could not import net/http (cannot find packag
e "net/http" in any of:
        /usr/lib/go-1.6/src/net/http (from $GOROOT)
        /home/andrej/go/src/net/http (from $GOPATH))
/home/andrej/go/src/github.com/gorilla/context/context.go:9:2: could not import sync (cannot find package "sync" in 
any of:
        /usr/lib/go-1.6/src/sync (from $GOROOT)
        /home/andrej/go/src/sync (from $GOPATH))
/home/andrej/go/src/github.com/gorilla/context/context.go:10:2: could not import time (cannot find package "time" in
 any of:
        /usr/lib/go-1.6/src/time (from $GOROOT)
        /home/andrej/go/src/time (from $GOPATH))

The GOROOT is the old Ubuntu one.

The correct one is:

$ go env GOROOT
/usr/local/go

Most helpful comment

Try :GoUpdateBinaries

All 3 comments

Try :GoUpdateBinaries

Hi @andrejvanderzee

Guru embeds the goroot into it's library. That's why as @nhooyr said you have to upgrade your binary. We have an open PR to avoid such problems in the future, though that is an improvement that vim-go provides, but the problem is still a user-facing one. Feel free to reopen another issue if it's not getting fixed.

@nhooyr @fatih That worked indeed!

And thanks for vim-go too, it's great :-)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

smontazeran picture smontazeran  路  4Comments

zhangjing picture zhangjing  路  3Comments

groob picture groob  路  3Comments

johnzeng picture johnzeng  路  3Comments

MattFlower picture MattFlower  路  4Comments