`go mod vendor` should only be used when compatibility with older go versions is necessary. For a go 1.11+ project it’s irrelevant, as go doesn’t use the vendor directory anymore. To get your dependencies for a project and generate your `go.mod` file you just need to `go mod tidy`