nsf / gocode

An autocompletion daemon for the Go programming language
MIT License
5.01k stars 656 forks source link

Autocomplete fails for import log "github.com/sirupsen/logrus" #444

Open nndurj opened 7 years ago

nndurj commented 7 years ago

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

nsf commented 7 years ago

Maybe you have a log variable somewhere. Or another log package.

tobyjwebb commented 5 years ago

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.