Let's say I am working on a Go project, called X, which has a dependency upon a repo Y. I am not using go mods in my project X yet.
I have now added Y as a git submodule in my project X in the vendor pkg using the following command:
git submodule add <URL to Git repo> <Directory in vendor pkg>
.
The repo Y has sub-dependencies on a project, say Z defined inside it in Gopkg.toml and go.mod files. Now, when I put my code to a server and run the following command to fetch the submodule Y, files of dependency Z are still missing.
What should I do to download the files for Z using the Gopkg.toml and go.mod files without explicitly going into Y and downloading.