how to resolve definition(GoDef) with gopls when I don't have go.mod file

241 views Asked by At

I have a project, which doesn't use go.mod, and not follow the structure that project is under $GOPATH/src/.... It uses bazel and WORKSPACE file to manage depedencies.

I use gopls in neovim, and it could not resolve imports like import github.com/pkg/errors, so I am thinking to install the package one by one. However, go get needs to be with a go.mod file, and go install only works when installing a binary.

What option I have here? Thanks!

0

There are 0 answers