gocode
gocode copied to clipboard
Autocomplete fails for import log "github.com/sirupsen/logrus"
I'm using vim-go. Autocomplete for logrus fails when I import it as log with import log "github.com/sirupsen/logrus".
It work for everything other than log. Like, if I do import log2 "github.com/sirupsen/logrus", it works
Maybe you have a log variable somewhere. Or another log package.
I was having a very similar issue when using Go modules. In the end I had to go to ~/go/src folder and run the following command:
go get github.com/sirupsen/logrus
And then the autocomplete started working perfectly.