gocode icon indicating copy to clipboard operation
gocode copied to clipboard

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

Open nndurj opened this issue 8 years ago • 2 comments

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

nndurj avatar Apr 04 '17 02:04 nndurj

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

nsf avatar Apr 04 '17 06:04 nsf

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.

tobyjwebb avatar Mar 05 '19 22:03 tobyjwebb