go get adds github.com/olivere/elastic/v7 as an indirect dependency in go.mod
Please use the following questions as a guideline to help me answer your issue/question without further inquiry. Thank you.
Which version of Elastic are you using?
elastic.v7 (for Elasticsearch 7.x)
Please describe the expected behavior
github.com/olivere/elastic/v7 should have been added as a direct dependency import "github.com/olivere/elastic/v7" should be recognised as a valid path
Please describe the actual behavior
github.com/olivere/elastic/v7 added as an indirect dependency import "github.com/olivere/elastic/v7" not recognised as a valid path
Any steps to reproduce the behavior?
- Go version is 1.14.3
- go get github.com/olivere/elastic/[email protected]
- go mod vendor
- import "github.com/olivere/elastic/v7" in your package
But when I first import "github.com/olivere/elastic/v7" in my package (without running go get) and then run go mod vendor, it's added as a direct dependency and import path is also recognised in my package
Thanks for reporting. Yep, there's something wrong. I probably know why this happens, and will fix in the next release.
Hmm... for the moment, I'm not sure where this is coming from. Need to investigate a bit more.